|
| 1 | +=== tests/cases/compiler/b.ts === |
| 2 | +export { |
| 3 | + Hash, |
| 4 | +>Hash : Symbol(Hash, Decl(b.ts, 0, 8)) |
| 5 | + |
| 6 | + StringHash, StringHash2 |
| 7 | +>StringHash : Symbol(StringHash, Decl(b.ts, 1, 9)) |
| 8 | +>StringHash2 : Symbol(StringHash2, Decl(b.ts, 2, 15)) |
| 9 | + |
| 10 | +}; |
| 11 | + |
| 12 | +interface Hash<T> { |
| 13 | +>Hash : Symbol(Hash, Decl(b.ts, 3, 2)) |
| 14 | +>T : Symbol(T, Decl(b.ts, 5, 15)) |
| 15 | + |
| 16 | + [key: string]: T; |
| 17 | +>key : Symbol(key, Decl(b.ts, 6, 5)) |
| 18 | +>T : Symbol(T, Decl(b.ts, 5, 15)) |
| 19 | +} |
| 20 | + |
| 21 | +type StringHash = Hash<string>; |
| 22 | +>StringHash : Symbol(StringHash, Decl(b.ts, 7, 1)) |
| 23 | +>Hash : Symbol(Hash, Decl(b.ts, 3, 2)) |
| 24 | + |
| 25 | +interface StringHash2 extends Hash<string> {} |
| 26 | +>StringHash2 : Symbol(StringHash2, Decl(b.ts, 9, 31)) |
| 27 | +>Hash : Symbol(Hash, Decl(b.ts, 3, 2)) |
| 28 | + |
| 29 | +=== tests/cases/compiler/a.ts === |
| 30 | +import {StringHash, StringHash2} from "./b"; |
| 31 | +>StringHash : Symbol(StringHash, Decl(a.ts, 0, 8)) |
| 32 | +>StringHash2 : Symbol(StringHash2, Decl(a.ts, 0, 19)) |
| 33 | + |
| 34 | +export { |
| 35 | + doSome |
| 36 | +>doSome : Symbol(doSome, Decl(a.ts, 2, 8)) |
| 37 | +} |
| 38 | + |
| 39 | +const MAP: StringHash = { |
| 40 | +>MAP : Symbol(MAP, Decl(a.ts, 6, 5)) |
| 41 | +>StringHash : Symbol(StringHash, Decl(a.ts, 0, 8)) |
| 42 | + |
| 43 | + a: "a" |
| 44 | +>a : Symbol(a, Decl(a.ts, 6, 25)) |
| 45 | + |
| 46 | +}; |
| 47 | + |
| 48 | +const MAP2: StringHash2 = { |
| 49 | +>MAP2 : Symbol(MAP2, Decl(a.ts, 10, 5)) |
| 50 | +>StringHash2 : Symbol(StringHash2, Decl(a.ts, 0, 19)) |
| 51 | + |
| 52 | + a: "a" |
| 53 | +>a : Symbol(a, Decl(a.ts, 10, 27)) |
| 54 | + |
| 55 | +}; |
| 56 | + |
| 57 | +function doSome(arg1: string, |
| 58 | +>doSome : Symbol(doSome, Decl(a.ts, 12, 2)) |
| 59 | +>arg1 : Symbol(arg1, Decl(a.ts, 14, 16)) |
| 60 | + |
| 61 | + arg2 = MAP, |
| 62 | +>arg2 : Symbol(arg2, Decl(a.ts, 14, 29)) |
| 63 | +>MAP : Symbol(MAP, Decl(a.ts, 6, 5)) |
| 64 | + |
| 65 | + arg3 = MAP2) { |
| 66 | +>arg3 : Symbol(arg3, Decl(a.ts, 15, 27)) |
| 67 | +>MAP2 : Symbol(MAP2, Decl(a.ts, 10, 5)) |
| 68 | +} |
0 commit comments