identity-collection-keys.ts:6:12 - error SC2020: 'collection key conversion from '{ extra: string; id: number }' to '{ id: number }' requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

  5 | // Copying an existing wider record would lose JavaScript key identity.
  6 | narrow.set(wide, 1);
    |            ^~~~
  7 | narrow.get(wide);

  hint: use the same reference type for the key and collection; copying a key would change its identity

identity-collection-keys.ts:7:12 - error SC2020: 'collection key conversion from '{ extra: string; id: number }' to '{ id: number }' requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

  6 | narrow.set(wide, 1);
  7 | narrow.get(wide);
    |            ^~~~
  8 | narrow.has(wide);

  hint: use the same reference type for the key and collection; copying a key would change its identity

identity-collection-keys.ts:8:12 - error SC2020: 'collection key conversion from '{ extra: string; id: number }' to '{ id: number }' requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

  7 | narrow.get(wide);
  8 | narrow.has(wide);
    |            ^~~~
  9 | narrow.delete(wide);

  hint: use the same reference type for the key and collection; copying a key would change its identity

identity-collection-keys.ts:9:15 - error SC2020: 'collection key conversion from '{ extra: string; id: number }' to '{ id: number }' requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

   8 | narrow.has(wide);
   9 | narrow.delete(wide);
     |               ^~~~
  10 | const seeded = new Map<Key, number>([[wide, 1]]);

  hint: use the same reference type for the key and collection; copying a key would change its identity

identity-collection-keys.ts:10:39 - error SC2020: 'collection key conversion from '{ extra: string; id: number }' to '{ id: number }' requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

   9 | narrow.delete(wide);
  10 | const seeded = new Map<Key, number>([[wide, 1]]);
     |                                       ^~~~
  11 | console.log(seeded);

  hint: use the same reference type for the key and collection; copying a key would change its identity

identity-collection-keys.ts:13:13 - error SC2020: 'collection key conversion from '{ extra: string; id: number }' to '{ id: number }' requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

  12 | const members = new Set<Key>();
  13 | members.add(wide);
     |             ^~~~
  14 | members.has(wide);

  hint: use the same reference type for the key and collection; copying a key would change its identity

identity-collection-keys.ts:14:13 - error SC2020: 'collection key conversion from '{ extra: string; id: number }' to '{ id: number }' requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

  13 | members.add(wide);
  14 | members.has(wide);
     |             ^~~~
  15 | const seededMembers = new Set<Key>([wide]);

  hint: use the same reference type for the key and collection; copying a key would change its identity

identity-collection-keys.ts:15:37 - error SC2020: 'collection key conversion from '{ extra: string; id: number }' to '{ id: number }' requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

  14 | members.has(wide);
  15 | const seededMembers = new Set<Key>([wide]);
     |                                     ^~~~
  16 | console.log(seededMembers);

  hint: use the same reference type for the key and collection; copying a key would change its identity

identity-collection-keys.ts:19:7 - error SC2009: values of type 'Map<string | Key, number>' cannot be compiled: the Map shape is supported, but 'string | Key' is outside its supported key domain (numbers, strings, identity references, or unions of identity references)

  18 | // An identity-key union must consist entirely of identity-bearing arms.
  19 | const mixed = new Map<Key | string, number>();
     |       ^~~~~
  20 | const nullable = new Set<Key | undefined>();

  hint: the outer shape is supported — the named component is the blocker; restate it inside the compilable set (number, string, boolean, arrays, Maps, Sets, RegExp, functions, classes, records, unions of those, and 'unknown')

identity-collection-keys.ts:19:15 - error SC1090: Map keys of type 'string | Key' (Map keys must be numbers, strings, identity references, or unions of identity references) is not supported yet

  18 | // An identity-key union must consist entirely of identity-bearing arms.
  19 | const mixed = new Map<Key | string, number>();
     |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  20 | const nullable = new Set<Key | undefined>();

identity-collection-keys.ts:20:7 - error SC2009: values of type 'Set<Key | undefined>' cannot be compiled: the Set shape is supported, but 'Key | undefined' is outside its supported element domain (numbers, strings, identity references, or unions of identity references)

  19 | const mixed = new Map<Key | string, number>();
  20 | const nullable = new Set<Key | undefined>();
     |       ^~~~~~~~
  21 | console.log(mixed, nullable);

  hint: the outer shape is supported — the named component is the blocker; restate it inside the compilable set (number, string, boolean, arrays, Maps, Sets, RegExp, functions, classes, records, unions of those, and 'unknown')

identity-collection-keys.ts:20:18 - error SC1090: Set elements of type 'Key | undefined' (Set elements must be numbers, strings, identity references, or unions of identity references) is not supported yet

  19 | const mixed = new Map<Key | string, number>();
  20 | const nullable = new Set<Key | undefined>();
     |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
  21 | console.log(mixed, nullable);

identity-collection-keys.ts:21:13 - error SC2004: uses of 'mixed' inherit the blocker on its declaration

  20 | const nullable = new Set<Key | undefined>();
  21 | console.log(mixed, nullable);
     |             ^~~~~
  22 | 

  hint: the declaration of 'mixed' did not compile — fix the diagnostic reported there and these sites clear with it

identity-collection-keys.ts:25:12 - error SC2020: 'collection key assertion requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

  24 | const unknownKey: unknown = wide;
  25 | narrow.get(unknownKey as Key);
     |            ^~~~~~~~~~~~~~~~~
  26 | 

  hint: use the original reference with the same type as the collection key

identity-collection-keys.ts:30:18 - error SC2020: 'collection key conversion from '{ extra: string; id: number }[]' to '{ id: number }[]' requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

  29 | const wideArray: Wide[] = [wide];
  30 | narrowArrays.set(wideArray, 1);
     |                  ^~~~~~~~~
  31 | 

  hint: use the same reference type for the key and collection; copying a key would change its identity

identity-collection-keys.ts:33:12 - error SC2020: 'collection key assertion requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

  32 | // An explicit record assertion must not hide the same structural copy.
  33 | narrow.get(wide as Key);
     |            ^~~~~~~~~~~
  34 | members.delete((wide as Key)!);

  hint: use the original reference with the same type as the collection key

identity-collection-keys.ts:34:17 - error SC2020: 'collection key assertion requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

  33 | narrow.get(wide as Key);
  34 | members.delete((wide as Key)!);
     |                 ^~~~~~~~~~~
  35 | new Set<Key>([wide as Key]);

  hint: use the original reference with the same type as the collection key

identity-collection-keys.ts:35:15 - error SC2020: 'collection key assertion requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

  34 | members.delete((wide as Key)!);
  35 | new Set<Key>([wide as Key]);
     |               ^~~~~~~~~~~
  36 | 

  hint: use the original reference with the same type as the collection key

identity-collection-keys.ts:39:14 - error SC2020: 'collection key assertion requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

  38 | const unknownKeys: unknown = [{ id: 1 }];
  39 | new Set<Key>(unknownKeys as Key[]);
     |              ^~~~~~~~~~~~~~~~~~~~
  40 | new Set<Key>(unknownKeys as [Key]);

  hint: use the original reference with the same type as the collection key

identity-collection-keys.ts:40:14 - error SC2020: 'collection key assertion requiring a structural copy or dynamic conversion' is part of the standard library types but has no scriptc lowering yet

  39 | new Set<Key>(unknownKeys as Key[]);
  40 | new Set<Key>(unknownKeys as [Key]);
     |              ^~~~~~~~~~~~~~~~~~~~
  41 | 

  hint: use the original reference with the same type as the collection key