|
| 1 | +//// [tests/cases/conformance/types/typeParameters/typeParameterLists/typeParameterConstModifiersWithIntersection.ts] //// |
| 2 | + |
| 3 | +=== typeParameterConstModifiersWithIntersection.ts === |
| 4 | +// https://github.com/microsoft/TypeScript/issues/55778 |
| 5 | + |
| 6 | +interface Config<T1 extends { type: string }> { |
| 7 | +>Config : Symbol(Config, Decl(typeParameterConstModifiersWithIntersection.ts, 0, 0)) |
| 8 | +>T1 : Symbol(T1, Decl(typeParameterConstModifiersWithIntersection.ts, 2, 17)) |
| 9 | +>type : Symbol(type, Decl(typeParameterConstModifiersWithIntersection.ts, 2, 29)) |
| 10 | + |
| 11 | + useIt: T1; |
| 12 | +>useIt : Symbol(Config.useIt, Decl(typeParameterConstModifiersWithIntersection.ts, 2, 47)) |
| 13 | +>T1 : Symbol(T1, Decl(typeParameterConstModifiersWithIntersection.ts, 2, 17)) |
| 14 | +} |
| 15 | + |
| 16 | +declare function test< |
| 17 | +>test : Symbol(test, Decl(typeParameterConstModifiersWithIntersection.ts, 4, 1)) |
| 18 | + |
| 19 | + T1 extends { type: string }, |
| 20 | +>T1 : Symbol(T1, Decl(typeParameterConstModifiersWithIntersection.ts, 6, 22)) |
| 21 | +>type : Symbol(type, Decl(typeParameterConstModifiersWithIntersection.ts, 7, 14)) |
| 22 | + |
| 23 | + const TConfig extends Config<T1>, |
| 24 | +>TConfig : Symbol(TConfig, Decl(typeParameterConstModifiersWithIntersection.ts, 7, 30)) |
| 25 | +>Config : Symbol(Config, Decl(typeParameterConstModifiersWithIntersection.ts, 0, 0)) |
| 26 | +>T1 : Symbol(T1, Decl(typeParameterConstModifiersWithIntersection.ts, 6, 22)) |
| 27 | + |
| 28 | +>(config: { produceThing: T1 } & TConfig): TConfig; |
| 29 | +>config : Symbol(config, Decl(typeParameterConstModifiersWithIntersection.ts, 9, 2)) |
| 30 | +>produceThing : Symbol(produceThing, Decl(typeParameterConstModifiersWithIntersection.ts, 9, 11)) |
| 31 | +>T1 : Symbol(T1, Decl(typeParameterConstModifiersWithIntersection.ts, 6, 22)) |
| 32 | +>TConfig : Symbol(TConfig, Decl(typeParameterConstModifiersWithIntersection.ts, 7, 30)) |
| 33 | +>TConfig : Symbol(TConfig, Decl(typeParameterConstModifiersWithIntersection.ts, 7, 30)) |
| 34 | + |
| 35 | +const result = test({ |
| 36 | +>result : Symbol(result, Decl(typeParameterConstModifiersWithIntersection.ts, 11, 5)) |
| 37 | +>test : Symbol(test, Decl(typeParameterConstModifiersWithIntersection.ts, 4, 1)) |
| 38 | + |
| 39 | + produceThing: {} as { |
| 40 | +>produceThing : Symbol(produceThing, Decl(typeParameterConstModifiersWithIntersection.ts, 11, 21)) |
| 41 | + |
| 42 | + type: "foo"; |
| 43 | +>type : Symbol(type, Decl(typeParameterConstModifiersWithIntersection.ts, 12, 23)) |
| 44 | + |
| 45 | + }, |
| 46 | + useIt: { |
| 47 | +>useIt : Symbol(useIt, Decl(typeParameterConstModifiersWithIntersection.ts, 14, 4)) |
| 48 | + |
| 49 | + type: "foo", |
| 50 | +>type : Symbol(type, Decl(typeParameterConstModifiersWithIntersection.ts, 15, 10)) |
| 51 | + |
| 52 | + }, |
| 53 | + extra: 10, |
| 54 | +>extra : Symbol(extra, Decl(typeParameterConstModifiersWithIntersection.ts, 17, 4)) |
| 55 | + |
| 56 | +}); |
0 commit comments