|
| 1 | +//// [tests/cases/compiler/inferenceContextualReturnTypeUnion4.ts] //// |
| 2 | + |
| 3 | +=== inferenceContextualReturnTypeUnion4.ts === |
| 4 | +// https://github.com/microsoft/TypeScript/issues/57905 |
| 5 | + |
| 6 | +export abstract class Storage { |
| 7 | +>Storage : Symbol(Storage, Decl(inferenceContextualReturnTypeUnion4.ts, 0, 0)) |
| 8 | + |
| 9 | + abstract get<T extends string>(): T | Promise<T>; |
| 10 | +>get : Symbol(Storage.get, Decl(inferenceContextualReturnTypeUnion4.ts, 2, 31)) |
| 11 | +>T : Symbol(T, Decl(inferenceContextualReturnTypeUnion4.ts, 3, 17)) |
| 12 | +>T : Symbol(T, Decl(inferenceContextualReturnTypeUnion4.ts, 3, 17)) |
| 13 | +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) |
| 14 | +>T : Symbol(T, Decl(inferenceContextualReturnTypeUnion4.ts, 3, 17)) |
| 15 | +} |
| 16 | + |
| 17 | +export abstract class SyncStorage extends Storage { |
| 18 | +>SyncStorage : Symbol(SyncStorage, Decl(inferenceContextualReturnTypeUnion4.ts, 4, 1)) |
| 19 | +>Storage : Symbol(Storage, Decl(inferenceContextualReturnTypeUnion4.ts, 0, 0)) |
| 20 | + |
| 21 | + abstract override get<T extends string>(): T; |
| 22 | +>get : Symbol(SyncStorage.get, Decl(inferenceContextualReturnTypeUnion4.ts, 6, 51)) |
| 23 | +>T : Symbol(T, Decl(inferenceContextualReturnTypeUnion4.ts, 7, 26)) |
| 24 | +>T : Symbol(T, Decl(inferenceContextualReturnTypeUnion4.ts, 7, 26)) |
| 25 | +} |
| 26 | + |
| 27 | +export abstract class ASyncStorage extends Storage { |
| 28 | +>ASyncStorage : Symbol(ASyncStorage, Decl(inferenceContextualReturnTypeUnion4.ts, 8, 1)) |
| 29 | +>Storage : Symbol(Storage, Decl(inferenceContextualReturnTypeUnion4.ts, 0, 0)) |
| 30 | + |
| 31 | + abstract override get<T extends string>(): Promise<T>; |
| 32 | +>get : Symbol(ASyncStorage.get, Decl(inferenceContextualReturnTypeUnion4.ts, 10, 52)) |
| 33 | +>T : Symbol(T, Decl(inferenceContextualReturnTypeUnion4.ts, 11, 26)) |
| 34 | +>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.iterable.d.ts, --, --), Decl(lib.es2015.promise.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2018.promise.d.ts, --, --)) |
| 35 | +>T : Symbol(T, Decl(inferenceContextualReturnTypeUnion4.ts, 11, 26)) |
| 36 | +} |
| 37 | + |
0 commit comments