Files
tsgo/testdata/baselines/reference/submodule/compiler/fakeInfinity1.errors.txt

29 lines
807 B
Plaintext

fakeInfinity1.ts(17,1): error TS2322: Type 'number' is not assignable to type 'Infinity'.
==== fakeInfinity1.ts (1 errors) ====
// These are not actually the real infinity.
export type PositiveInfinity = 1e999;
export type NegativeInfinity = -1e999;
export type TypeOfInfinity = typeof Infinity;
export type TypeOfNaN = typeof NaN;
type A = 1e999;
type B = 1e9999;
declare let a: A;
declare let b: B;
a = b;
b = a;
a = Infinity;
~
!!! error TS2322: Type 'number' is not assignable to type 'Infinity'.
a = 1e999;
a = 1e9999;
export type Oops = 123456789123456789123456789123456789123456789123456789;
export const oops = 123456789123456789123456789123456789123456789123456789;