24 lines
569 B
Plaintext
24 lines
569 B
Plaintext
exports[`test test.js 1`] = `
|
|
"declare function foo(x: number): string;
|
|
declare function foo(x: string): number;
|
|
declare function foo<X>(x: X): X;
|
|
|
|
(foo(0): string); // OK
|
|
(foo(\"hello\"): number); // OK
|
|
(foo(false): void); // error, boolean ~/~ undefined
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
// OK
|
|
// OK
|
|
// error, boolean ~/~ undefined
|
|
declare function foo(x: number): string;
|
|
declare function foo(x: string): number;
|
|
declare function foo<X>(x: X): X;
|
|
|
|
(foo(0): string);
|
|
|
|
(foo(\"hello\"): number);
|
|
|
|
(foo(false): void);
|
|
"
|
|
`;
|