|
| 1 | +//// [tests/cases/compiler/returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts] //// |
| 2 | + |
| 3 | +=== returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts === |
| 4 | +declare function outer1(arg: { prop: any }): void; |
| 5 | +>outer1 : Symbol(outer1, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 0, 0)) |
| 6 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 0, 24)) |
| 7 | +>prop : Symbol(prop, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 0, 30)) |
| 8 | + |
| 9 | +declare function outer2(arg: { prop: unknown }): void; |
| 10 | +>outer2 : Symbol(outer2, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 0, 50)) |
| 11 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 1, 24)) |
| 12 | +>prop : Symbol(prop, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 1, 30)) |
| 13 | + |
| 14 | +declare function inner1<T extends (arg: string) => any>(arg: T): T; |
| 15 | +>inner1 : Symbol(inner1, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 1, 54)) |
| 16 | +>T : Symbol(T, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 3, 24)) |
| 17 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 3, 35)) |
| 18 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 3, 56)) |
| 19 | +>T : Symbol(T, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 3, 24)) |
| 20 | +>T : Symbol(T, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 3, 24)) |
| 21 | + |
| 22 | +const result1 = inner1((arg) => arg); |
| 23 | +>result1 : Symbol(result1, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 5, 5)) |
| 24 | +>inner1 : Symbol(inner1, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 1, 54)) |
| 25 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 5, 24)) |
| 26 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 5, 24)) |
| 27 | + |
| 28 | +outer1({ |
| 29 | +>outer1 : Symbol(outer1, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 0, 0)) |
| 30 | + |
| 31 | + prop: inner1((arg) => arg), |
| 32 | +>prop : Symbol(prop, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 7, 8)) |
| 33 | +>inner1 : Symbol(inner1, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 1, 54)) |
| 34 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 8, 16)) |
| 35 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 8, 16)) |
| 36 | + |
| 37 | +}); |
| 38 | + |
| 39 | +outer2({ |
| 40 | +>outer2 : Symbol(outer2, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 0, 50)) |
| 41 | + |
| 42 | + prop: inner1((arg) => arg), |
| 43 | +>prop : Symbol(prop, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 11, 8)) |
| 44 | +>inner1 : Symbol(inner1, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 1, 54)) |
| 45 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 12, 16)) |
| 46 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 12, 16)) |
| 47 | + |
| 48 | +}); |
| 49 | + |
| 50 | +declare function inner2<T>(arg: T & ((arg: string) => any)): T; |
| 51 | +>inner2 : Symbol(inner2, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 13, 3)) |
| 52 | +>T : Symbol(T, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 15, 24)) |
| 53 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 15, 27)) |
| 54 | +>T : Symbol(T, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 15, 24)) |
| 55 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 15, 38)) |
| 56 | +>T : Symbol(T, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 15, 24)) |
| 57 | + |
| 58 | +const result2 = inner2((arg) => arg); |
| 59 | +>result2 : Symbol(result2, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 17, 5)) |
| 60 | +>inner2 : Symbol(inner2, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 13, 3)) |
| 61 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 17, 24)) |
| 62 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 17, 24)) |
| 63 | + |
| 64 | +outer1({ |
| 65 | +>outer1 : Symbol(outer1, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 0, 0)) |
| 66 | + |
| 67 | + prop: inner2((arg) => arg), |
| 68 | +>prop : Symbol(prop, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 19, 8)) |
| 69 | +>inner2 : Symbol(inner2, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 13, 3)) |
| 70 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 20, 16)) |
| 71 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 20, 16)) |
| 72 | + |
| 73 | +}); |
| 74 | + |
| 75 | +outer2({ |
| 76 | +>outer2 : Symbol(outer2, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 0, 50)) |
| 77 | + |
| 78 | + prop: inner2((arg) => arg), |
| 79 | +>prop : Symbol(prop, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 23, 8)) |
| 80 | +>inner2 : Symbol(inner2, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 13, 3)) |
| 81 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 24, 16)) |
| 82 | +>arg : Symbol(arg, Decl(returnTypeInferenceContextualTypeIgnoreAnyUnknown1.ts, 24, 16)) |
| 83 | + |
| 84 | +}); |
| 85 | + |
0 commit comments