Skip to content

ensureIsEmpty

Ensure that a context has an isEmpty ref, creating one if needed. Only call this when you need to reactively observe isEmpty (e.g., ContentSlot, mapJoin). Most contexts don’t need an isEmpty ref.

import { ensureIsEmpty } from "@alloy-js/core";
function ensureIsEmpty(context: Context): Ref<boolean>;
context

Context

Ref<boolean>