Emit .d.ts file in test
This commit is contained in:
parent
936f98d9ad
commit
bf75a3f4ac
|
@ -23,3 +23,20 @@ var x1 = f1(fo, fs); // (x: string) => void
|
|||
var x2 = f2("abc", fo, fs); // "abc"
|
||||
var x3 = f3("abc", fo, fx); // "abc" | "def"
|
||||
var x4 = f4(fo, fs); // Func<string>
|
||||
|
||||
|
||||
//// [strictFunctionTypes1.d.ts]
|
||||
declare function f1<T>(f1: (x: T) => void, f2: (x: T) => void): (x: T) => void;
|
||||
declare function f2<T>(obj: T, f1: (x: T) => void, f2: (x: T) => void): T;
|
||||
declare function f3<T>(obj: T, f1: (x: T) => void, f2: (f: (x: T) => void) => void): T;
|
||||
interface Func<T> {
|
||||
(x: T): void;
|
||||
}
|
||||
declare function f4<T>(f1: Func<T>, f2: Func<T>): Func<T>;
|
||||
declare function fo(x: Object): void;
|
||||
declare function fs(x: string): void;
|
||||
declare function fx(f: (x: "def") => void): void;
|
||||
declare const x1: (x: string) => void;
|
||||
declare const x2 = "abc";
|
||||
declare const x3: string;
|
||||
declare const x4: Func<string>;
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
// @strict: true
|
||||
// @declaration: true
|
||||
|
||||
declare function f1<T>(f1: (x: T) => void, f2: (x: T) => void): (x: T) => void;
|
||||
declare function f2<T>(obj: T, f1: (x: T) => void, f2: (x: T) => void): T;
|
||||
|
|
Loading…
Reference in a new issue