File: contextuallyTypedIifeStrict.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 (132 lines) | stat: -rw-r--r-- 6,100 bytes parent folder | download
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
=== tests/cases/conformance/expressions/functions/contextuallyTypedIifeStrict.ts ===
// arrow
(jake => { })("build");
>jake : Symbol(jake, Decl(contextuallyTypedIifeStrict.ts, 1, 1))

// function expression
(function (cats) { })("lol");
>cats : Symbol(cats, Decl(contextuallyTypedIifeStrict.ts, 3, 11))

// Lots of Irritating Superfluous Parentheses
(function (x) { } ("!"));
>x : Symbol(x, Decl(contextuallyTypedIifeStrict.ts, 5, 11))

((((function (y) { }))))("-");
>y : Symbol(y, Decl(contextuallyTypedIifeStrict.ts, 6, 14))

// multiple arguments
((a, b, c) => { })("foo", 101, false);
>a : Symbol(a, Decl(contextuallyTypedIifeStrict.ts, 8, 2))
>b : Symbol(b, Decl(contextuallyTypedIifeStrict.ts, 8, 4))
>c : Symbol(c, Decl(contextuallyTypedIifeStrict.ts, 8, 7))

// default parameters
((m = 10) => m + 1)(12);
>m : Symbol(m, Decl(contextuallyTypedIifeStrict.ts, 10, 2))
>m : Symbol(m, Decl(contextuallyTypedIifeStrict.ts, 10, 2))

((n = 10) => n + 1)();
>n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 11, 2))
>n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 11, 2))

// optional parameters
((j?) => j + 1)(12);
>j : Symbol(j, Decl(contextuallyTypedIifeStrict.ts, 13, 2))
>j : Symbol(j, Decl(contextuallyTypedIifeStrict.ts, 13, 2))

((k?) => k + 1)();
>k : Symbol(k, Decl(contextuallyTypedIifeStrict.ts, 14, 2))
>k : Symbol(k, Decl(contextuallyTypedIifeStrict.ts, 14, 2))

((l, o?) => l + o)(12); // o should be any
>l : Symbol(l, Decl(contextuallyTypedIifeStrict.ts, 15, 2))
>o : Symbol(o, Decl(contextuallyTypedIifeStrict.ts, 15, 4))
>l : Symbol(l, Decl(contextuallyTypedIifeStrict.ts, 15, 2))
>o : Symbol(o, Decl(contextuallyTypedIifeStrict.ts, 15, 4))

// rest parameters
((...numbers) => numbers.every(n => n > 0))(5,6,7);
>numbers : Symbol(numbers, Decl(contextuallyTypedIifeStrict.ts, 17, 2))
>numbers.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --))
>numbers : Symbol(numbers, Decl(contextuallyTypedIifeStrict.ts, 17, 2))
>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --))
>n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 17, 31))
>n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 17, 31))

((...mixed) => mixed.every(n => !!n))(5,'oops','oh no');
>mixed : Symbol(mixed, Decl(contextuallyTypedIifeStrict.ts, 18, 2))
>mixed.every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --))
>mixed : Symbol(mixed, Decl(contextuallyTypedIifeStrict.ts, 18, 2))
>every : Symbol(Array.every, Decl(lib.es5.d.ts, --, --))
>n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 18, 27))
>n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 18, 27))

((...noNumbers) => noNumbers.some(n => n > 0))();
>noNumbers : Symbol(noNumbers, Decl(contextuallyTypedIifeStrict.ts, 19, 2))
>noNumbers.some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --))
>noNumbers : Symbol(noNumbers, Decl(contextuallyTypedIifeStrict.ts, 19, 2))
>some : Symbol(Array.some, Decl(lib.es5.d.ts, --, --))
>n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 19, 34))
>n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 19, 34))

((first, ...rest) => first ? [] : rest.map(n => n > 0))(8,9,10);
>first : Symbol(first, Decl(contextuallyTypedIifeStrict.ts, 20, 2))
>rest : Symbol(rest, Decl(contextuallyTypedIifeStrict.ts, 20, 8))
>first : Symbol(first, Decl(contextuallyTypedIifeStrict.ts, 20, 2))
>rest.map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --))
>rest : Symbol(rest, Decl(contextuallyTypedIifeStrict.ts, 20, 8))
>map : Symbol(Array.map, Decl(lib.es5.d.ts, --, --))
>n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 20, 43))
>n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 20, 43))

// destructuring parameters (with defaults too!)
(({ q }) => q)({ q : 13 });
>q : Symbol(q, Decl(contextuallyTypedIifeStrict.ts, 22, 3))
>q : Symbol(q, Decl(contextuallyTypedIifeStrict.ts, 22, 3))
>q : Symbol(q, Decl(contextuallyTypedIifeStrict.ts, 22, 16))

(({ p = 14 }) => p)({ p : 15 });
>p : Symbol(p, Decl(contextuallyTypedIifeStrict.ts, 23, 3))
>p : Symbol(p, Decl(contextuallyTypedIifeStrict.ts, 23, 3))
>p : Symbol(p, Decl(contextuallyTypedIifeStrict.ts, 23, 21))

(({ r = 17 } = { r: 18 }) => r)({r : 19});
>r : Symbol(r, Decl(contextuallyTypedIifeStrict.ts, 24, 3))
>r : Symbol(r, Decl(contextuallyTypedIifeStrict.ts, 24, 16))
>r : Symbol(r, Decl(contextuallyTypedIifeStrict.ts, 24, 3))
>r : Symbol(r, Decl(contextuallyTypedIifeStrict.ts, 24, 33))

(({ u = 22 } = { u: 23 }) => u)();
>u : Symbol(u, Decl(contextuallyTypedIifeStrict.ts, 25, 3))
>u : Symbol(u, Decl(contextuallyTypedIifeStrict.ts, 25, 16))
>u : Symbol(u, Decl(contextuallyTypedIifeStrict.ts, 25, 3))

// contextually typed parameters.
let twelve = (f => f(12))(i => i);
>twelve : Symbol(twelve, Decl(contextuallyTypedIifeStrict.ts, 27, 3))
>f : Symbol(f, Decl(contextuallyTypedIifeStrict.ts, 27, 14))
>f : Symbol(f, Decl(contextuallyTypedIifeStrict.ts, 27, 14))
>i : Symbol(i, Decl(contextuallyTypedIifeStrict.ts, 27, 26))
>i : Symbol(i, Decl(contextuallyTypedIifeStrict.ts, 27, 26))

let eleven = (o => o.a(11))({ a: function(n) { return n; } });
>eleven : Symbol(eleven, Decl(contextuallyTypedIifeStrict.ts, 28, 3))
>o : Symbol(o, Decl(contextuallyTypedIifeStrict.ts, 28, 14))
>o.a : Symbol(a, Decl(contextuallyTypedIifeStrict.ts, 28, 29))
>o : Symbol(o, Decl(contextuallyTypedIifeStrict.ts, 28, 14))
>a : Symbol(a, Decl(contextuallyTypedIifeStrict.ts, 28, 29))
>a : Symbol(a, Decl(contextuallyTypedIifeStrict.ts, 28, 29))
>n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 28, 42))
>n : Symbol(n, Decl(contextuallyTypedIifeStrict.ts, 28, 42))

// missing arguments
(function(x, undefined) { return x; })(42);
>x : Symbol(x, Decl(contextuallyTypedIifeStrict.ts, 30, 10))
>undefined : Symbol(undefined, Decl(contextuallyTypedIifeStrict.ts, 30, 12))
>x : Symbol(x, Decl(contextuallyTypedIifeStrict.ts, 30, 10))

((x, y, z) => 42)();
>x : Symbol(x, Decl(contextuallyTypedIifeStrict.ts, 31, 2))
>y : Symbol(y, Decl(contextuallyTypedIifeStrict.ts, 31, 4))
>z : Symbol(z, Decl(contextuallyTypedIifeStrict.ts, 31, 7))