Skip to main content
cngx-src documentation

createSlotRegistry

Functioncore/utils/registry

projects/core/utils/registry.ts

Description#

Signal-based single-slot registry with a destroy-safe release path.
The one-handle sibling of createKeyedRegistry for slots like a dialog's title / description handle: register is last-write-wins (a recreated child simply claims the slot), while unregister only clears the slot when the releasing handle still holds it - the teardown of a replaced predecessor cannot blank a successor's claim. Mirrors the guarded pattern CngxDialog uses for its aria handles.

Signature#

createSlotRegistry()

Returns#

SlotRegistry