File: circularTypeofWithVarOrFunc.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 (72 lines) | stat: -rw-r--r-- 3,230 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
=== tests/cases/conformance/types/specifyingTypes/typeQueries/circularTypeofWithVarOrFunc.ts ===
type typeAlias1 = typeof varOfAliasedType1;
>typeAlias1 : Symbol(typeAlias1, Decl(circularTypeofWithVarOrFunc.ts, 0, 0))
>varOfAliasedType1 : Symbol(varOfAliasedType1, Decl(circularTypeofWithVarOrFunc.ts, 1, 3))

var varOfAliasedType1: typeAlias1;
>varOfAliasedType1 : Symbol(varOfAliasedType1, Decl(circularTypeofWithVarOrFunc.ts, 1, 3))
>typeAlias1 : Symbol(typeAlias1, Decl(circularTypeofWithVarOrFunc.ts, 0, 0))

var varOfAliasedType2: typeAlias2;
>varOfAliasedType2 : Symbol(varOfAliasedType2, Decl(circularTypeofWithVarOrFunc.ts, 3, 3))
>typeAlias2 : Symbol(typeAlias2, Decl(circularTypeofWithVarOrFunc.ts, 3, 34))

type typeAlias2 = typeof varOfAliasedType2;
>typeAlias2 : Symbol(typeAlias2, Decl(circularTypeofWithVarOrFunc.ts, 3, 34))
>varOfAliasedType2 : Symbol(varOfAliasedType2, Decl(circularTypeofWithVarOrFunc.ts, 3, 3))

function func(): typeAlias3 { return null; }
>func : Symbol(func, Decl(circularTypeofWithVarOrFunc.ts, 4, 43))
>typeAlias3 : Symbol(typeAlias3, Decl(circularTypeofWithVarOrFunc.ts, 7, 31))

var varOfAliasedType3 = func();
>varOfAliasedType3 : Symbol(varOfAliasedType3, Decl(circularTypeofWithVarOrFunc.ts, 7, 3))
>func : Symbol(func, Decl(circularTypeofWithVarOrFunc.ts, 4, 43))

type typeAlias3 = typeof varOfAliasedType3;
>typeAlias3 : Symbol(typeAlias3, Decl(circularTypeofWithVarOrFunc.ts, 7, 31))
>varOfAliasedType3 : Symbol(varOfAliasedType3, Decl(circularTypeofWithVarOrFunc.ts, 7, 3))

// Repro from #26104

interface Input {
>Input : Symbol(Input, Decl(circularTypeofWithVarOrFunc.ts, 8, 43))

  a: number;
>a : Symbol(Input.a, Decl(circularTypeofWithVarOrFunc.ts, 12, 17))

  b: number;
>b : Symbol(Input.b, Decl(circularTypeofWithVarOrFunc.ts, 13, 12))
}

type R = ReturnType<typeof mul>;
>R : Symbol(R, Decl(circularTypeofWithVarOrFunc.ts, 15, 1))
>ReturnType : Symbol(ReturnType, Decl(lib.es5.d.ts, --, --))
>mul : Symbol(mul, Decl(circularTypeofWithVarOrFunc.ts, 17, 32))

function mul(input: Input): R {
>mul : Symbol(mul, Decl(circularTypeofWithVarOrFunc.ts, 17, 32))
>input : Symbol(input, Decl(circularTypeofWithVarOrFunc.ts, 18, 13))
>Input : Symbol(Input, Decl(circularTypeofWithVarOrFunc.ts, 8, 43))
>R : Symbol(R, Decl(circularTypeofWithVarOrFunc.ts, 15, 1))

  return input.a * input.b;
>input.a : Symbol(Input.a, Decl(circularTypeofWithVarOrFunc.ts, 12, 17))
>input : Symbol(input, Decl(circularTypeofWithVarOrFunc.ts, 18, 13))
>a : Symbol(Input.a, Decl(circularTypeofWithVarOrFunc.ts, 12, 17))
>input.b : Symbol(Input.b, Decl(circularTypeofWithVarOrFunc.ts, 13, 12))
>input : Symbol(input, Decl(circularTypeofWithVarOrFunc.ts, 18, 13))
>b : Symbol(Input.b, Decl(circularTypeofWithVarOrFunc.ts, 13, 12))
}

// Repro from #26104

type R2 = ReturnType<typeof f>;
>R2 : Symbol(R2, Decl(circularTypeofWithVarOrFunc.ts, 20, 1))
>ReturnType : Symbol(ReturnType, Decl(lib.es5.d.ts, --, --))
>f : Symbol(f, Decl(circularTypeofWithVarOrFunc.ts, 24, 31))

function f(): R2 { return 0; }
>f : Symbol(f, Decl(circularTypeofWithVarOrFunc.ts, 24, 31))
>R2 : Symbol(R2, Decl(circularTypeofWithVarOrFunc.ts, 20, 1))