collection-views.ts:7:23 - error SC2002: record shapes must match exactly or width-coerce: expected 'Set<string>', got '{ has: (string) => boolean; size: number }'

  6 | const mock = { has(value: string): boolean { return value === "word"; }, size: 1 };
  7 | const fake: WordSet = mock as unknown as WordSet;
    |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~
  8 | console.log(fake.has("word"));

  hint: width subtyping compiles as a copy (each expected field copied off the source; extra fields drop) — this pair is outside the copy's rules; build a literal with exactly the expected fields instead

collection-views.ts:9:14 - error SC2002: record shapes must match exactly or width-coerce: expected 'Set<string>', got '{ has: (string) => boolean; size: number }'

   8 | console.log(fake.has("word"));
   9 | console.log((mock as unknown as WordSet).has("word"));
     |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
  10 | console.log((mock as unknown as WordSet).size);

  hint: width subtyping compiles as a copy (each expected field copied off the source; extra fields drop) — this pair is outside the copy's rules; build a literal with exactly the expected fields instead

collection-views.ts:10:14 - error SC2002: record shapes must match exactly or width-coerce: expected 'Set<string>', got '{ has: (string) => boolean; size: number }'

   9 | console.log((mock as unknown as WordSet).has("word"));
  10 | console.log((mock as unknown as WordSet).size);
     |              ^~~~~~~~~~~~~~~~~~~~~~~~~~
  11 | console.log((new Set<number>([1]) as unknown as WordSet).has("word"));

  hint: width subtyping compiles as a copy (each expected field copied off the source; extra fields drop) — this pair is outside the copy's rules; build a literal with exactly the expected fields instead

collection-views.ts:11:14 - error SC1090: 'Set<number>' values where 'Set<string>' is expected is not supported yet

  10 | console.log((mock as unknown as WordSet).size);
  11 | console.log((new Set<number>([1]) as unknown as WordSet).has("word"));
     |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  12 | 

collection-views.ts:16:14 - error SC1090: 'Map<number, number>' values where 'Map<string, number>' is expected is not supported yet

  15 | }
  16 | console.log((new Map<number, number>([[1, 2]]) as unknown as WordMap).has("word"));
     |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  17 | 

collection-views.ts:20:7 - error SC2009: values of type 'TaggedSet' cannot be compiled: the record shape is supported, but its member 'forEach' has type '(callbackfn: (value: string, value2: string, set: ReadonlySet<string>) => void, thisArg?: any) => void', which does not compile

  19 | interface TaggedSet extends ReadonlySet<string> { readonly label: string }
  20 | const tagged = new Set<string>() as unknown as TaggedSet;
     |       ^~~~~~
  21 | console.log(tagged.label);

  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')

collection-views.ts:21:13 - error SC2004: uses of 'tagged' inherit the blocker on its declaration

  20 | const tagged = new Set<string>() as unknown as TaggedSet;
  21 | console.log(tagged.label);
     |             ^~~~~~~~~~~~
  22 | 

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

collection-views.ts:27:7 - error SC2009: values of type 'OverloadedSet' cannot be compiled: the record shape is supported, but its member 'has' has type '{ (value: string): boolean; (value: number): boolean; }', which does not compile

  26 | }
  27 | const overloaded = new Set<string>() as unknown as OverloadedSet;
     |       ^~~~~~~~~~
  28 | console.log(overloaded.has(1));

  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')

collection-views.ts:28:13 - error SC1090: method calls like 'overloaded.has' is not supported yet

  27 | const overloaded = new Set<string>() as unknown as OverloadedSet;
  28 | console.log(overloaded.has(1));
     |             ^~~~~~~~~~~~~~~~~
  29 | 