mirror of
https://github.com/swc-project/swc.git
synced 2024-12-28 08:04:43 +03:00
23 lines
303 B
TypeScript
23 lines
303 B
TypeScript
|
var x: typeof undefined;
|
||
|
|
||
|
var a: number = x;
|
||
|
var b: boolean = x;
|
||
|
var c: string = x;
|
||
|
var d: void = x;
|
||
|
|
||
|
var e: typeof undefined = x;
|
||
|
e = x; // should work
|
||
|
|
||
|
class C { foo: string }
|
||
|
var f: C;
|
||
|
f = x;
|
||
|
|
||
|
interface I { foo: string }
|
||
|
var g: I;
|
||
|
g = x;
|
||
|
|
||
|
var h: { f(): void } = x;
|
||
|
|
||
|
function i<T>(a: T) {
|
||
|
a = x;
|
||
|
}
|