|
| 1 | +=== tests/cases/conformance/salsa/use.js === |
| 2 | +var ex = require('./ex') |
| 3 | +>ex : Symbol(ex, Decl(use.js, 0, 3)) |
| 4 | +>'./ex' : Symbol("tests/cases/conformance/salsa/ex", Decl(ex.d.ts, 0, 0)) |
| 5 | + |
| 6 | +// values work |
| 7 | +var crunch = new ex.Crunch(1); |
| 8 | +>crunch : Symbol(crunch, Decl(use.js, 3, 3)) |
| 9 | +>ex.Crunch : Symbol(Crunch, Decl(ex.d.ts, 0, 33)) |
| 10 | +>ex : Symbol(ex, Decl(use.js, 0, 3)) |
| 11 | +>Crunch : Symbol(Crunch, Decl(ex.d.ts, 0, 33)) |
| 12 | + |
| 13 | +crunch.n |
| 14 | +>crunch.n : Symbol(Crunch.n, Decl(ex.d.ts, 1, 21)) |
| 15 | +>crunch : Symbol(crunch, Decl(use.js, 3, 3)) |
| 16 | +>n : Symbol(Crunch.n, Decl(ex.d.ts, 1, 21)) |
| 17 | + |
| 18 | + |
| 19 | +// types work |
| 20 | +/** |
| 21 | + * @param {ex.Greatest} greatest |
| 22 | + * @param {ex.Crunch} wrap |
| 23 | + */ |
| 24 | +function f(greatest, wrap) { |
| 25 | +>f : Symbol(f, Decl(use.js, 4, 8)) |
| 26 | +>greatest : Symbol(greatest, Decl(use.js, 12, 11)) |
| 27 | +>wrap : Symbol(wrap, Decl(use.js, 12, 20)) |
| 28 | + |
| 29 | + greatest.day |
| 30 | +>greatest.day : Symbol(day, Decl(ex.d.ts, 0, 24)) |
| 31 | +>greatest : Symbol(greatest, Decl(use.js, 12, 11)) |
| 32 | +>day : Symbol(day, Decl(ex.d.ts, 0, 24)) |
| 33 | + |
| 34 | + wrap.n |
| 35 | +>wrap.n : Symbol(Crunch.n, Decl(ex.d.ts, 1, 21)) |
| 36 | +>wrap : Symbol(wrap, Decl(use.js, 12, 20)) |
| 37 | +>n : Symbol(Crunch.n, Decl(ex.d.ts, 1, 21)) |
| 38 | +} |
| 39 | + |
| 40 | +=== tests/cases/conformance/salsa/ex.d.ts === |
| 41 | +export type Greatest = { day: 1 } |
| 42 | +>Greatest : Symbol(Greatest, Decl(ex.d.ts, 0, 0)) |
| 43 | +>day : Symbol(day, Decl(ex.d.ts, 0, 24)) |
| 44 | + |
| 45 | +export class Crunch { |
| 46 | +>Crunch : Symbol(Crunch, Decl(ex.d.ts, 0, 33)) |
| 47 | + |
| 48 | + n: number |
| 49 | +>n : Symbol(Crunch.n, Decl(ex.d.ts, 1, 21)) |
| 50 | + |
| 51 | + m(): number |
| 52 | +>m : Symbol(Crunch.m, Decl(ex.d.ts, 2, 13)) |
| 53 | + |
| 54 | + constructor(n: number) |
| 55 | +>n : Symbol(n, Decl(ex.d.ts, 4, 16)) |
| 56 | +} |
| 57 | + |
0 commit comments