maybe-promise-fences.ts:8:10 - error SC2009: values of type 'Promise<number> | Thenish' cannot be compiled: the union shape is supported, but its arm 'Thenish' declares 'then' beside a promise arm, so 'await' would have to adopt it as a thenable (a maybe-promise union's data arms must not be thenable)

  7 | }
  8 | function thenable(): Thenish | Promise<number> {
    |          ^~~~~~~~
  9 |   return Promise.resolve(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')

maybe-promise-fences.ts:11:20 - error SC2004: uses of 'thenable' inherit the blocker on its declaration

  10 | }
  11 | console.log(typeof thenable);
     |                    ^~~~~~~~
  12 | 

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

maybe-promise-fences.ts:16:10 - error SC2009: values of type 'boolean | Promise<string> | Promise<RegExp>' cannot be compiled: the union shape is supported, but its promise arms ('Promise<string>' and 'Promise<RegExp>') do not merge into one promise (their payloads have no common union layout)

  15 | // a RegExp payload is the promise slot's own, not an arm.
  16 | function splitPromises(): Promise<RegExp> | Promise<string> | boolean {
     |          ^~~~~~~~~~~~~
  17 |   return true;

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

maybe-promise-fences.ts:19:20 - error SC2004: uses of 'splitPromises' inherit the blocker on its declaration

  18 | }
  19 | console.log(typeof splitPromises);
     |                    ^~~~~~~~~~~~~
  20 | 

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

maybe-promise-fences.ts:25:13 - error SC1090: console.log of 'Promise<string> | string' values ('Promise<string>' values have no inspect lowering) are not supported yet

  24 | }
  25 | console.log(maybe(true));
     |             ^~~~~~~~~~~
  26 | 

maybe-promise-fences.ts:29:50 - error SC2020: 'Promise.resolve over 'Promise<string> | string' at this result type' is part of the standard library types but has no scriptc lowering yet

  28 | // must be that arm's own promise type.
  29 | const widened = Promise.resolve<string | number>(maybe(false));
     |                                                  ^~~~~~~~~~~~
  30 | console.log(typeof widened);

  hint: the promise arm passes through identically, so it must already be the result's promise type