forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdeclFileTypeofFunction.js
More file actions
75 lines (66 loc) · 1.49 KB
/
Copy pathdeclFileTypeofFunction.js
File metadata and controls
75 lines (66 loc) · 1.49 KB
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
//// [tests/cases/compiler/declFileTypeofFunction.ts] ////
//// [declFileTypeofFunction.ts]
function f(n: typeof f): string;
function f(n: typeof g): string;
function f() { return undefined; }
function g(n: typeof g): number;
function g(n: typeof f): number;
function g() { return undefined; }
var b: () => typeof b;
function b1() {
return b1;
}
function foo(): typeof foo {
return null;
}
var foo1: typeof foo;
var foo2 = foo;
var foo3 = function () {
return foo3;
}
var x = () => {
return x;
}
function foo5(x: number) {
function bar(x: number) {
return x;
}
return bar;
}
//// [declFileTypeofFunction.js]
function f() { return undefined; }
function g() { return undefined; }
var b;
function b1() {
return b1;
}
function foo() {
return null;
}
var foo1;
var foo2 = foo;
var foo3 = function () {
return foo3;
};
var x = function () {
return x;
};
function foo5(x) {
function bar(x) {
return x;
}
return bar;
}
//// [declFileTypeofFunction.d.ts]
declare function f(n: typeof f): string;
declare function f(n: typeof g): string;
declare function g(n: typeof g): number;
declare function g(n: typeof f): number;
declare var b: () => typeof b;
declare function b1(): typeof b1;
declare function foo(): typeof foo;
declare var foo1: typeof foo;
declare var foo2: typeof foo;
declare var foo3: () => /*elided*/ any;
declare var x: () => /*elided*/ any;
declare function foo5(x: number): (x: number) => number;