@@ -3,9 +3,9 @@ import type { Destroyable, Destructor } from '@glimmer/interfaces';
33import debugToString from '@glimmer/debug-util/lib/debug-to-string' ;
44import { scheduleDestroy , scheduleDestroyed } from '@glimmer/global-context' ;
55import {
6- DESTROYABLE_META_SLOT ,
6+ DESTROYABLE_META_KEY ,
77 type HasDestroyableMetaSlot ,
8- } from '@glimmer/util/lib/destroyable-slot ' ;
8+ } from '@glimmer/util/lib/destroyable-key ' ;
99
1010const LIVE_STATE = 0 ;
1111const DESTROYING_STATE = 1 ;
@@ -100,15 +100,15 @@ function createMeta<T extends Destroyable>(destroyable: T): DestroyableMeta<T> {
100100
101101function getDestroyableMeta < T extends Destroyable > ( destroyable : T ) : DestroyableMeta < T > {
102102 let slotted = destroyable as HasDestroyableMetaSlot ;
103- let own = slotted [ DESTROYABLE_META_SLOT ] ;
103+ let own = slotted [ DESTROYABLE_META_KEY ] ;
104104
105105 if ( own !== undefined ) return own as DestroyableMeta < T > ;
106106
107107 // `in` rather than a write, so this stays a read for everything else.
108- if ( DESTROYABLE_META_SLOT in slotted ) {
108+ if ( DESTROYABLE_META_KEY in slotted ) {
109109 let meta = createMeta ( destroyable ) ;
110110
111- slotted [ DESTROYABLE_META_SLOT ] = meta ;
111+ slotted [ DESTROYABLE_META_KEY ] = meta ;
112112
113113 if ( DEBUG && DESTROYABLE_META instanceof Map ) {
114114 DESTROYABLE_META . set ( destroyable , meta as unknown as DestroyableMeta < Destroyable > ) ;
@@ -239,12 +239,12 @@ export function destroyChildren(destroyable: Destroyable) {
239239/** Meta if there is any, without creating it. Mirrors `getDestroyableMeta`. */
240240function peekDestroyableMeta ( destroyable : Destroyable ) : DestroyableMeta < Destroyable > | undefined {
241241 let slotted = destroyable as HasDestroyableMetaSlot ;
242- let own = slotted [ DESTROYABLE_META_SLOT ] ;
242+ let own = slotted [ DESTROYABLE_META_KEY ] ;
243243
244244 if ( own !== undefined ) return own as DestroyableMeta < Destroyable > ;
245245
246246 // An empty slot is proof there is no meta, so the map can be skipped.
247- if ( DESTROYABLE_META_SLOT in slotted ) return undefined ;
247+ if ( DESTROYABLE_META_KEY in slotted ) return undefined ;
248248
249249 return DESTROYABLE_META . get ( destroyable ) ;
250250}
0 commit comments