error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
doNotElaborateAssignabilityToTypeParameters.ts(3,3): error TS2322: Type 'Yadda | Awaited<T>' is not assignable to type 'T'.
  'T' could be instantiated with an arbitrary type which could be unrelated to 'Yadda | Awaited<T>'.


!!! error TS5107: Option 'target=ES5' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
==== doNotElaborateAssignabilityToTypeParameters.ts (1 errors) ====
    async function foo<T>(x: T): Promise<T> {
      let yaddable = await getXOrYadda(x);
      return yaddable;
      ~~~~~~
!!! error TS2322: Type 'Yadda | Awaited<T>' is not assignable to type 'T'.
!!! error TS2322:   'T' could be instantiated with an arbitrary type which could be unrelated to 'Yadda | Awaited<T>'.
    }
    
    interface Yadda {
      stuff: string,
      things: string,
    }
    
    declare function getXOrYadda<T>(x: T): T | Yadda;
    