mirror of
https://github.com/swc-project/swc.git
synced 2024-12-25 14:43:33 +03:00
13 lines
265 B
TypeScript
13 lines
265 B
TypeScript
// basic valid forms of function literals
|
|
|
|
var x = () => 1;
|
|
var x: {
|
|
(): number;
|
|
}
|
|
|
|
var y: { (x: string): string; };
|
|
var y: (x: string) => string;
|
|
var y2: { <T>(x: T): T; } = <T>(x: T) => x
|
|
|
|
var z: { new (x: number): number; };
|
|
var z: new (x: number) => number; |