mnemonica 1.4.6 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,8 +13,6 @@ import {
13
13
  } from '../api/types/Props';
14
14
  import { constants } from '../constants';
15
15
 
16
- const { SymbolConfig } = constants;
17
-
18
16
  import type {
19
17
  LineageGraph,
20
18
  LineageNode,
@@ -181,11 +179,12 @@ export const lineage = ( instances: object[], options?: LineageOptions ): Lineag
181
179
  const { __collection__: collection } = baseProps;
182
180
  // every collection carries a name by construction (the default
183
181
  // collection is 'defaultTypes', unnamed customs are auto-named), so
184
- // no fallback is needed here
185
- const collectionConfig = ( collection as unknown as { [ SymbolConfig ]?: { name?: string } } )[
186
- SymbolConfig
187
- ]!;
188
- const collectionName: string = collectionConfig.name!;
182
+ // no fallback is needed here; CollectionDef types its SymbolConfig
183
+ // entry as CollectionConfig with that name. Read through constants
184
+ // directly: a local alias (const or destructured) widens the unique
185
+ // symbol to symbol and loses the typed key
186
+ const collectionConfig = collection[ constants.SymbolConfig ];
187
+ const collectionName: string = collectionConfig.name;
189
188
 
190
189
  const node: LineageNode = {
191
190
  type : {