File: umd5.symbols

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (40 lines) | stat: -rw-r--r-- 1,154 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
=== tests/cases/conformance/externalModules/a.ts ===
import * as Bar from './foo';
>Bar : Symbol(Bar, Decl(a.ts, 0, 6))

Bar.fn();
>Bar.fn : Symbol(Bar.fn, Decl(foo.d.ts, 0, 21))
>Bar : Symbol(Bar, Decl(a.ts, 0, 6))
>fn : Symbol(Bar.fn, Decl(foo.d.ts, 0, 21))

let x: Bar.Thing;
>x : Symbol(x, Decl(a.ts, 2, 3))
>Bar : Symbol(Bar, Decl(a.ts, 0, 6))
>Thing : Symbol(Bar.Thing, Decl(foo.d.ts, 1, 27))

let y: number = x.n;
>y : Symbol(y, Decl(a.ts, 3, 3))
>x.n : Symbol(Bar.Thing.n, Decl(foo.d.ts, 2, 24))
>x : Symbol(x, Decl(a.ts, 2, 3))
>n : Symbol(Bar.Thing.n, Decl(foo.d.ts, 2, 24))

// should error
let z = Foo;
>z : Symbol(z, Decl(a.ts, 5, 3))
>Foo : Symbol(Foo, Decl(foo.d.ts, 2, 38))

=== tests/cases/conformance/externalModules/foo.d.ts ===
export var x: number;
>x : Symbol(x, Decl(foo.d.ts, 0, 10))

export function fn(): void;
>fn : Symbol(fn, Decl(foo.d.ts, 0, 21))

export interface Thing { n: typeof x }
>Thing : Symbol(Thing, Decl(foo.d.ts, 1, 27))
>n : Symbol(Thing.n, Decl(foo.d.ts, 2, 24))
>x : Symbol(x, Decl(foo.d.ts, 0, 10))

export as namespace Foo;
>Foo : Symbol(Foo, Decl(foo.d.ts, 2, 38))