TypeScript/tests/baselines/reference/declFileTypeofFunction.js

75 lines
1.4 KiB
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
//// [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; }
2014-07-13 01:04:16 +02:00
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;
2014-11-11 00:39:01 +01:00
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;
2014-09-05 22:05:36 +02:00
declare var foo3: () => any;
declare var x: () => any;
2014-07-12 01:36:06 +02:00
declare function foo5(x: number): (x: number) => number;