Skip to main content
cngx-src documentation

SlotRegistry

Interface

projects/core/utils/registry.ts

Import#

import { SlotRegistry } from '@cngx/core/utils'

Description#

Single-slot registry handle returned by createSlotRegistry.

Index#

Instance Properties#

current#Signal
Readonly

The currently registered handle, or null.

Methods#

register#void
register(handle: T)

Claims the slot. Last write wins.

@paramhandleT
unregister#void
unregister(handle: T)

Releases the slot - but only while handle still holds it. A stale holder releasing after a successor claimed the slot is a no-op.

@paramhandleT