mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 23:27:56 +03:00
27 lines
427 B
TypeScript
27 lines
427 B
TypeScript
interface Number {
|
|
doStuff(): string;
|
|
}
|
|
|
|
interface NotNumber {
|
|
toString(radix?: number): string;
|
|
toFixed(fractionDigits?: number): string;
|
|
toExponential(fractionDigits?: number): string;
|
|
toPrecision(precision?: number): string;
|
|
valueOf(): number;
|
|
doStuff(): string;
|
|
}
|
|
|
|
var x = 1;
|
|
var a: Number;
|
|
var b: NotNumber;
|
|
|
|
a = x;
|
|
a = b;
|
|
|
|
b = a;
|
|
b = x;
|
|
|
|
x = a; // expected error
|
|
x = b; // expected error
|
|
|