mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 01:34:55 -06:00
Update baselines to have no evolving types
This commit is contained in:
parent
8674d92bdb
commit
a4d584f14a
@ -10,10 +10,10 @@ var Foo;
|
||||
>Foo : any
|
||||
|
||||
type
|
||||
>type : undefined
|
||||
>type : any
|
||||
|
||||
Foo = string;
|
||||
>Foo = string : undefined
|
||||
>Foo = string : any
|
||||
>Foo : any
|
||||
>string : undefined
|
||||
>string : any
|
||||
|
||||
|
||||
@ -59,9 +59,9 @@ var e = undefined;
|
||||
>undefined : undefined
|
||||
|
||||
x = e;
|
||||
>x = e : undefined
|
||||
>x = e : any
|
||||
>x : any
|
||||
>e : undefined
|
||||
>e : any
|
||||
|
||||
var e2: typeof undefined;
|
||||
>e2 : any
|
||||
|
||||
@ -179,7 +179,7 @@ function foo3(x) {
|
||||
use(v);
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : undefined
|
||||
>v : any
|
||||
}
|
||||
|
||||
function foo4(x) {
|
||||
@ -283,8 +283,8 @@ function foo6(x) {
|
||||
>y : any
|
||||
|
||||
var v = x;
|
||||
>v : undefined
|
||||
>x : undefined
|
||||
>v : any
|
||||
>x : any
|
||||
|
||||
(function() { return x + y + v });
|
||||
>(function() { return x + y + v }) : () => any
|
||||
@ -293,7 +293,7 @@ function foo6(x) {
|
||||
>x + y : any
|
||||
>x : any
|
||||
>y : any
|
||||
>v : undefined
|
||||
>v : any
|
||||
|
||||
(() => x + y + v);
|
||||
>(() => x + y + v) : () => any
|
||||
@ -302,13 +302,13 @@ function foo6(x) {
|
||||
>x + y : any
|
||||
>x : any
|
||||
>y : any
|
||||
>v : undefined
|
||||
>v : any
|
||||
}
|
||||
|
||||
use(v)
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : undefined
|
||||
>v : any
|
||||
}
|
||||
|
||||
function foo7(x) {
|
||||
@ -321,8 +321,8 @@ function foo7(x) {
|
||||
>y : any
|
||||
|
||||
var v = x;
|
||||
>v : undefined
|
||||
>x : undefined
|
||||
>v : any
|
||||
>x : any
|
||||
|
||||
(function() { return x + y + v });
|
||||
>(function() { return x + y + v }) : () => any
|
||||
@ -331,7 +331,7 @@ function foo7(x) {
|
||||
>x + y : any
|
||||
>x : any
|
||||
>y : any
|
||||
>v : undefined
|
||||
>v : any
|
||||
|
||||
(() => x + y + v);
|
||||
>(() => x + y + v) : () => any
|
||||
@ -340,7 +340,7 @@ function foo7(x) {
|
||||
>x + y : any
|
||||
>x : any
|
||||
>y : any
|
||||
>v : undefined
|
||||
>v : any
|
||||
|
||||
} while (1 === 1);
|
||||
>1 === 1 : boolean
|
||||
@ -350,7 +350,7 @@ function foo7(x) {
|
||||
use(v);
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : undefined
|
||||
>v : any
|
||||
}
|
||||
|
||||
|
||||
@ -574,7 +574,7 @@ function foo3_c(x) {
|
||||
use(v);
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : undefined
|
||||
>v : any
|
||||
}
|
||||
|
||||
function foo4_c(x) {
|
||||
|
||||
@ -180,7 +180,7 @@ function foo3(x) {
|
||||
use(v);
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : undefined
|
||||
>v : any
|
||||
}
|
||||
|
||||
function foo4(x) {
|
||||
@ -284,8 +284,8 @@ function foo6(x) {
|
||||
>y : any
|
||||
|
||||
var v = x;
|
||||
>v : undefined
|
||||
>x : undefined
|
||||
>v : any
|
||||
>x : any
|
||||
|
||||
(function() { return x + y + v });
|
||||
>(function() { return x + y + v }) : () => any
|
||||
@ -294,7 +294,7 @@ function foo6(x) {
|
||||
>x + y : any
|
||||
>x : any
|
||||
>y : any
|
||||
>v : undefined
|
||||
>v : any
|
||||
|
||||
(() => x + y + v);
|
||||
>(() => x + y + v) : () => any
|
||||
@ -303,13 +303,13 @@ function foo6(x) {
|
||||
>x + y : any
|
||||
>x : any
|
||||
>y : any
|
||||
>v : undefined
|
||||
>v : any
|
||||
}
|
||||
|
||||
use(v)
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : undefined
|
||||
>v : any
|
||||
}
|
||||
|
||||
function foo7(x) {
|
||||
@ -322,8 +322,8 @@ function foo7(x) {
|
||||
>y : any
|
||||
|
||||
var v = x;
|
||||
>v : undefined
|
||||
>x : undefined
|
||||
>v : any
|
||||
>x : any
|
||||
|
||||
(function() { return x + y + v });
|
||||
>(function() { return x + y + v }) : () => any
|
||||
@ -332,7 +332,7 @@ function foo7(x) {
|
||||
>x + y : any
|
||||
>x : any
|
||||
>y : any
|
||||
>v : undefined
|
||||
>v : any
|
||||
|
||||
(() => x + y + v);
|
||||
>(() => x + y + v) : () => any
|
||||
@ -341,7 +341,7 @@ function foo7(x) {
|
||||
>x + y : any
|
||||
>x : any
|
||||
>y : any
|
||||
>v : undefined
|
||||
>v : any
|
||||
|
||||
} while (1 === 1);
|
||||
>1 === 1 : boolean
|
||||
@ -351,7 +351,7 @@ function foo7(x) {
|
||||
use(v);
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : undefined
|
||||
>v : any
|
||||
}
|
||||
|
||||
|
||||
@ -575,7 +575,7 @@ function foo3_c(x) {
|
||||
use(v);
|
||||
>use(v) : any
|
||||
>use : (a: any) => any
|
||||
>v : undefined
|
||||
>v : any
|
||||
}
|
||||
|
||||
function foo4_c(x) {
|
||||
|
||||
@ -17,12 +17,12 @@ export function exportedFoo() {
|
||||
>v0 : any
|
||||
>v00 : string
|
||||
>v1 : number
|
||||
>v2 : undefined
|
||||
>v3 : undefined
|
||||
>v2 : any
|
||||
>v3 : any
|
||||
>v4 : number
|
||||
>v5 : number
|
||||
>v6 : undefined
|
||||
>v7 : undefined
|
||||
>v6 : any
|
||||
>v7 : any
|
||||
>v8 : number
|
||||
}
|
||||
|
||||
@ -103,15 +103,15 @@ while (1 === 1) {
|
||||
>x : any
|
||||
|
||||
var v2 = x;
|
||||
>v2 : undefined
|
||||
>x : undefined
|
||||
>v2 : any
|
||||
>x : any
|
||||
|
||||
(function() { return x + v2});
|
||||
>(function() { return x + v2}) : () => any
|
||||
>function() { return x + v2} : () => any
|
||||
>x + v2 : any
|
||||
>x : any
|
||||
>v2 : undefined
|
||||
>v2 : any
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
@ -124,15 +124,15 @@ do {
|
||||
>x : any
|
||||
|
||||
var v3 = x;
|
||||
>v3 : undefined
|
||||
>x : undefined
|
||||
>v3 : any
|
||||
>x : any
|
||||
|
||||
(function() { return x + v3});
|
||||
>(function() { return x + v3}) : () => any
|
||||
>function() { return x + v3} : () => any
|
||||
>x + v3 : any
|
||||
>x : any
|
||||
>v3 : undefined
|
||||
>v3 : any
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
@ -216,8 +216,8 @@ while (1 === 1) {
|
||||
>y : any
|
||||
|
||||
var v6 = x;
|
||||
>v6 : undefined
|
||||
>x : undefined
|
||||
>v6 : any
|
||||
>x : any
|
||||
|
||||
(function() { return x + y + v6});
|
||||
>(function() { return x + y + v6}) : () => any
|
||||
@ -226,7 +226,7 @@ while (1 === 1) {
|
||||
>x + y : any
|
||||
>x : any
|
||||
>y : any
|
||||
>v6 : undefined
|
||||
>v6 : any
|
||||
|
||||
(() => x + y);
|
||||
>(() => x + y) : () => any
|
||||
@ -242,8 +242,8 @@ do {
|
||||
>y : any
|
||||
|
||||
var v7 = x;
|
||||
>v7 : undefined
|
||||
>x : undefined
|
||||
>v7 : any
|
||||
>x : any
|
||||
|
||||
(function() { return x + y + v7});
|
||||
>(function() { return x + y + v7}) : () => any
|
||||
@ -252,7 +252,7 @@ do {
|
||||
>x + y : any
|
||||
>x : any
|
||||
>y : any
|
||||
>v7 : undefined
|
||||
>v7 : any
|
||||
|
||||
(() => x + y);
|
||||
>(() => x + y) : () => any
|
||||
|
||||
@ -17,12 +17,12 @@ export function exportedFoo() {
|
||||
>v0 : any
|
||||
>v00 : string
|
||||
>v1 : number
|
||||
>v2 : undefined
|
||||
>v3 : undefined
|
||||
>v2 : any
|
||||
>v3 : any
|
||||
>v4 : number
|
||||
>v5 : number
|
||||
>v6 : undefined
|
||||
>v7 : undefined
|
||||
>v6 : any
|
||||
>v7 : any
|
||||
>v8 : number
|
||||
}
|
||||
|
||||
@ -103,15 +103,15 @@ while (1 === 1) {
|
||||
>x : any
|
||||
|
||||
var v2 = x;
|
||||
>v2 : undefined
|
||||
>x : undefined
|
||||
>v2 : any
|
||||
>x : any
|
||||
|
||||
(function() { return x + v2});
|
||||
>(function() { return x + v2}) : () => any
|
||||
>function() { return x + v2} : () => any
|
||||
>x + v2 : any
|
||||
>x : any
|
||||
>v2 : undefined
|
||||
>v2 : any
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
@ -124,15 +124,15 @@ do {
|
||||
>x : any
|
||||
|
||||
var v3 = x;
|
||||
>v3 : undefined
|
||||
>x : undefined
|
||||
>v3 : any
|
||||
>x : any
|
||||
|
||||
(function() { return x + v3});
|
||||
>(function() { return x + v3}) : () => any
|
||||
>function() { return x + v3} : () => any
|
||||
>x + v3 : any
|
||||
>x : any
|
||||
>v3 : undefined
|
||||
>v3 : any
|
||||
|
||||
(() => x);
|
||||
>(() => x) : () => any
|
||||
@ -216,8 +216,8 @@ while (1 === 1) {
|
||||
>y : any
|
||||
|
||||
var v6 = x;
|
||||
>v6 : undefined
|
||||
>x : undefined
|
||||
>v6 : any
|
||||
>x : any
|
||||
|
||||
(function() { return x + y + v6});
|
||||
>(function() { return x + y + v6}) : () => any
|
||||
@ -226,7 +226,7 @@ while (1 === 1) {
|
||||
>x + y : any
|
||||
>x : any
|
||||
>y : any
|
||||
>v6 : undefined
|
||||
>v6 : any
|
||||
|
||||
(() => x + y);
|
||||
>(() => x + y) : () => any
|
||||
@ -242,8 +242,8 @@ do {
|
||||
>y : any
|
||||
|
||||
var v7 = x;
|
||||
>v7 : undefined
|
||||
>x : undefined
|
||||
>v7 : any
|
||||
>x : any
|
||||
|
||||
(function() { return x + y + v7});
|
||||
>(function() { return x + y + v7}) : () => any
|
||||
@ -252,7 +252,7 @@ do {
|
||||
>x + y : any
|
||||
>x : any
|
||||
>y : any
|
||||
>v7 : undefined
|
||||
>v7 : any
|
||||
|
||||
(() => x + y);
|
||||
>(() => x + y) : () => any
|
||||
|
||||
@ -39,7 +39,7 @@ for (let x = 0; x < 1; ++x) {
|
||||
}
|
||||
|
||||
switch (x) {
|
||||
>x : undefined
|
||||
>x : any
|
||||
|
||||
case 1:
|
||||
>1 : 1
|
||||
|
||||
@ -40,7 +40,7 @@ for (let x = 0; x < 1; ++x) {
|
||||
}
|
||||
|
||||
switch (x) {
|
||||
>x : undefined
|
||||
>x : any
|
||||
|
||||
case 1:
|
||||
>1 : 1
|
||||
|
||||
@ -17,7 +17,7 @@ foo(/*c2*/ 1, /*d2*/ 1 + 2, /*e1*/ a + b);
|
||||
>1 : 1
|
||||
>2 : 2
|
||||
>a + b : any
|
||||
>a : undefined
|
||||
>a : any
|
||||
>b : any
|
||||
|
||||
foo(/*c3*/ function () { }, /*d2*/() => { }, /*e2*/ a + /*e3*/ b);
|
||||
@ -26,7 +26,7 @@ foo(/*c3*/ function () { }, /*d2*/() => { }, /*e2*/ a + /*e3*/ b);
|
||||
>function () { } : () => void
|
||||
>() => { } : () => void
|
||||
>a + /*e3*/ b : any
|
||||
>a : undefined
|
||||
>a : any
|
||||
>b : any
|
||||
|
||||
foo(/*c3*/ function () { }, /*d3*/() => { }, /*e3*/(a + b));
|
||||
@ -36,7 +36,7 @@ foo(/*c3*/ function () { }, /*d3*/() => { }, /*e3*/(a + b));
|
||||
>() => { } : () => void
|
||||
>(a + b) : any
|
||||
>a + b : any
|
||||
>a : undefined
|
||||
>a : any
|
||||
>b : any
|
||||
|
||||
foo(
|
||||
|
||||
@ -9,12 +9,12 @@ var x1: number;
|
||||
x1 *= value;
|
||||
>x1 *= value : number
|
||||
>x1 : number
|
||||
>value : undefined
|
||||
>value : any
|
||||
|
||||
x1 += value;
|
||||
>x1 += value : number
|
||||
>x1 += value : any
|
||||
>x1 : number
|
||||
>value : undefined
|
||||
>value : any
|
||||
|
||||
function fn1(x2: number) {
|
||||
>fn1 : (x2: number) => void
|
||||
@ -41,41 +41,41 @@ x3.a *= value;
|
||||
>x3.a : number
|
||||
>x3 : { a: number; }
|
||||
>a : number
|
||||
>value : undefined
|
||||
>value : any
|
||||
|
||||
x3.a += value;
|
||||
>x3.a += value : number
|
||||
>x3.a += value : any
|
||||
>x3.a : number
|
||||
>x3 : { a: number; }
|
||||
>a : number
|
||||
>value : undefined
|
||||
>value : any
|
||||
|
||||
x3['a'] *= value;
|
||||
>x3['a'] *= value : number
|
||||
>x3['a'] : number
|
||||
>x3 : { a: number; }
|
||||
>'a' : "a"
|
||||
>value : undefined
|
||||
>value : any
|
||||
|
||||
x3['a'] += value;
|
||||
>x3['a'] += value : number
|
||||
>x3['a'] += value : any
|
||||
>x3['a'] : number
|
||||
>x3 : { a: number; }
|
||||
>'a' : "a"
|
||||
>value : undefined
|
||||
>value : any
|
||||
|
||||
// parentheses, the contained expression is reference
|
||||
(x1) *= value;
|
||||
>(x1) *= value : number
|
||||
>(x1) : number
|
||||
>x1 : number
|
||||
>value : undefined
|
||||
>value : any
|
||||
|
||||
(x1) += value;
|
||||
>(x1) += value : number
|
||||
>(x1) += value : any
|
||||
>(x1) : number
|
||||
>x1 : number
|
||||
>value : undefined
|
||||
>value : any
|
||||
|
||||
function fn2(x4: number) {
|
||||
>fn2 : (x4: number) => void
|
||||
@ -100,15 +100,15 @@ function fn2(x4: number) {
|
||||
>x3.a : number
|
||||
>x3 : { a: number; }
|
||||
>a : number
|
||||
>value : undefined
|
||||
>value : any
|
||||
|
||||
(x3.a) += value;
|
||||
>(x3.a) += value : number
|
||||
>(x3.a) += value : any
|
||||
>(x3.a) : number
|
||||
>x3.a : number
|
||||
>x3 : { a: number; }
|
||||
>a : number
|
||||
>value : undefined
|
||||
>value : any
|
||||
|
||||
(x3['a']) *= value;
|
||||
>(x3['a']) *= value : number
|
||||
@ -116,13 +116,13 @@ function fn2(x4: number) {
|
||||
>x3['a'] : number
|
||||
>x3 : { a: number; }
|
||||
>'a' : "a"
|
||||
>value : undefined
|
||||
>value : any
|
||||
|
||||
(x3['a']) += value;
|
||||
>(x3['a']) += value : number
|
||||
>(x3['a']) += value : any
|
||||
>(x3['a']) : number
|
||||
>x3['a'] : number
|
||||
>x3 : { a: number; }
|
||||
>'a' : "a"
|
||||
>value : undefined
|
||||
>value : any
|
||||
|
||||
|
||||
@ -35,20 +35,20 @@ var a;
|
||||
>a : any
|
||||
|
||||
foo(a);
|
||||
>foo(a) : undefined
|
||||
>foo(a) : any
|
||||
>foo : <T extends String>(x: T) => T
|
||||
>a : undefined
|
||||
>a : any
|
||||
|
||||
foo2(a);
|
||||
>foo2(a) : undefined
|
||||
>foo2(a) : any
|
||||
>foo2 : <T extends { x: number; }>(x: T) => T
|
||||
>a : undefined
|
||||
>a : any
|
||||
|
||||
//foo3(a);
|
||||
foo4(a);
|
||||
>foo4(a) : undefined
|
||||
>foo4(a) : any
|
||||
>foo4 : <T extends <T>(x: T) => void>(x: T) => T
|
||||
>a : undefined
|
||||
>a : any
|
||||
|
||||
var b: number;
|
||||
>b : number
|
||||
@ -84,10 +84,10 @@ class C<T extends String> {
|
||||
}
|
||||
|
||||
var c1 = new C(a);
|
||||
>c1 : C<undefined>
|
||||
>new C(a) : C<undefined>
|
||||
>c1 : C<any>
|
||||
>new C(a) : C<any>
|
||||
>C : typeof C
|
||||
>a : undefined
|
||||
>a : any
|
||||
|
||||
var c2 = new C<any>(b);
|
||||
>c2 : C<any>
|
||||
@ -106,10 +106,10 @@ class C2<T extends { x: number }> {
|
||||
}
|
||||
|
||||
var c3 = new C2(a);
|
||||
>c3 : C2<undefined>
|
||||
>new C2(a) : C2<undefined>
|
||||
>c3 : C2<any>
|
||||
>new C2(a) : C2<any>
|
||||
>C2 : typeof C2
|
||||
>a : undefined
|
||||
>a : any
|
||||
|
||||
var c4 = new C2<any>(b);
|
||||
>c4 : C2<any>
|
||||
@ -138,10 +138,10 @@ class C4<T extends <T>(x:T) => T> {
|
||||
}
|
||||
|
||||
var c7 = new C4(a);
|
||||
>c7 : C4<undefined>
|
||||
>new C4(a) : C4<undefined>
|
||||
>c7 : C4<any>
|
||||
>new C4(a) : C4<any>
|
||||
>C4 : typeof C4
|
||||
>a : undefined
|
||||
>a : any
|
||||
|
||||
var c8 = new C4<any>(b);
|
||||
>c8 : C4<any>
|
||||
|
||||
@ -1,128 +0,0 @@
|
||||
tests/cases/compiler/controlFlowCaching.ts(38,17): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(38,29): error TS2339: Property 'y' does not exist on type 'never'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(40,17): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(40,29): error TS2339: Property 'x' does not exist on type 'never'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(42,17): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(42,29): error TS2339: Property 'y' does not exist on type 'never'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(44,17): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(44,29): error TS2339: Property 'y' does not exist on type 'never'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(46,17): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(46,29): error TS2339: Property 'y' does not exist on type 'never'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(48,17): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(48,29): error TS2339: Property 'y' does not exist on type 'never'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(53,5): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(53,14): error TS2339: Property 'y' does not exist on type 'never'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(55,14): error TS2678: Type '"start"' is not comparable to type 'undefined'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(58,14): error TS2678: Type '"end"' is not comparable to type 'undefined'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(61,14): error TS2678: Type '"middle"' is not comparable to type 'undefined'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(62,13): error TS2532: Object is possibly 'undefined'.
|
||||
tests/cases/compiler/controlFlowCaching.ts(62,25): error TS2339: Property 'y' does not exist on type 'never'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/controlFlowCaching.ts (19 errors) ====
|
||||
|
||||
// Repro for #8401
|
||||
|
||||
function f(dim, offsets, arr, acommon, centerAnchorLimit, g, has, lin) {
|
||||
var isRtl = this._isRtl(); // chart mirroring
|
||||
// prepare variable
|
||||
var o = this.opt, ta = this.chart.theme.axis, position = o.position,
|
||||
leftBottom = position !== "rightOrTop", rotation = o.rotation % 360,
|
||||
start, stop, titlePos, titleRotation = 0, titleOffset, axisVector, tickVector, anchorOffset, labelOffset, labelAlign,
|
||||
labelGap = this.chart.theme.axis.tick.labelGap,
|
||||
taFont = o.font || (ta.majorTick && ta.majorTick.font) || (ta.tick && ta.tick.font),
|
||||
taTitleFont = o.titleFont || (ta.title && ta.title.font),
|
||||
taFontColor = o.fontColor || (ta.majorTick && ta.majorTick.fontColor) || (ta.tick && ta.tick.fontColor) || "black",
|
||||
taTitleFontColor = o.titleFontColor || (ta.title && ta.title.fontColor) || "black",
|
||||
taTitleGap = (o.titleGap == 0) ? 0 : o.titleGap || (ta.title && ta.title.gap) || 15,
|
||||
taTitleOrientation = o.titleOrientation || (ta.title && ta.title.orientation) || "axis",
|
||||
taMajorTick = this.chart.theme.getTick("major", o),
|
||||
taMinorTick = this.chart.theme.getTick("minor", o),
|
||||
taMicroTick = this.chart.theme.getTick("micro", o),
|
||||
|
||||
taStroke = "stroke" in o ? o.stroke : ta.stroke,
|
||||
size = taFont ? g.normalizedLength(g.splitFontString(taFont).size) : 0,
|
||||
cosr = Math.abs(Math.cos(rotation * Math.PI / 180)),
|
||||
sinr = Math.abs(Math.sin(rotation * Math.PI / 180)),
|
||||
tsize = taTitleFont ? g.normalizedLength(g.splitFontString(taTitleFont).size) : 0;
|
||||
if (rotation < 0) {
|
||||
rotation += 360;
|
||||
}
|
||||
var cachedLabelW = this._getMaxLabelSize();
|
||||
cachedLabelW = cachedLabelW && cachedLabelW.majLabelW;
|
||||
titleOffset = size * cosr + (cachedLabelW || 0) * sinr + labelGap + Math.max(taMajorTick.length > 0 ? taMajorTick.length : 0,
|
||||
taMinorTick.length > 0 ? taMinorTick.length : 0) +
|
||||
tsize + taTitleGap;
|
||||
axisVector = { x: isRtl ? -1 : 1, y: 0 }; // chart mirroring
|
||||
switch (rotation) {
|
||||
default:
|
||||
if (rotation < (90 - centerAnchorLimit)) {
|
||||
labelOffset.y = leftBottom ? size : 0;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~
|
||||
!!! error TS2339: Property 'y' does not exist on type 'never'.
|
||||
} else if (rotation < (90 + centerAnchorLimit)) {
|
||||
labelOffset.x = -size * 0.4;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~
|
||||
!!! error TS2339: Property 'x' does not exist on type 'never'.
|
||||
} else if (rotation < 180) {
|
||||
labelOffset.y = leftBottom ? 0 : -size;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~
|
||||
!!! error TS2339: Property 'y' does not exist on type 'never'.
|
||||
} else if (rotation < (270 - centerAnchorLimit)) {
|
||||
labelOffset.y = leftBottom ? 0 : -size;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~
|
||||
!!! error TS2339: Property 'y' does not exist on type 'never'.
|
||||
} else if (rotation < (270 + centerAnchorLimit)) {
|
||||
labelOffset.y = leftBottom ? size * 0.4 : 0;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~
|
||||
!!! error TS2339: Property 'y' does not exist on type 'never'.
|
||||
} else {
|
||||
labelOffset.y = leftBottom ? size : 0;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~
|
||||
!!! error TS2339: Property 'y' does not exist on type 'never'.
|
||||
}
|
||||
}
|
||||
|
||||
titleRotation = (taTitleOrientation && taTitleOrientation == "away") ? 180 : 0;
|
||||
titlePos.y = offsets.t - titleOffset + (titleRotation ? 0 : tsize);
|
||||
~~~~~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~
|
||||
!!! error TS2339: Property 'y' does not exist on type 'never'.
|
||||
switch (labelAlign) {
|
||||
case "start":
|
||||
~~~~~~~
|
||||
!!! error TS2678: Type '"start"' is not comparable to type 'undefined'.
|
||||
labelAlign = "end";
|
||||
break;
|
||||
case "end":
|
||||
~~~~~
|
||||
!!! error TS2678: Type '"end"' is not comparable to type 'undefined'.
|
||||
labelAlign = "start";
|
||||
break;
|
||||
case "middle":
|
||||
~~~~~~~~
|
||||
!!! error TS2678: Type '"middle"' is not comparable to type 'undefined'.
|
||||
labelOffset.y -= size;
|
||||
~~~~~~~~~~~
|
||||
!!! error TS2532: Object is possibly 'undefined'.
|
||||
~
|
||||
!!! error TS2339: Property 'y' does not exist on type 'never'.
|
||||
break;
|
||||
}
|
||||
|
||||
let _ = rotation;
|
||||
}
|
||||
|
||||
@ -77,22 +77,22 @@ use(x);
|
||||
use(z0);
|
||||
>use(z0) : any
|
||||
>use : (a: any) => any
|
||||
>z0 : undefined
|
||||
>z0 : any
|
||||
|
||||
use(z1);
|
||||
>use(z1) : any
|
||||
>use : (a: any) => any
|
||||
>z1 : undefined
|
||||
>z1 : any
|
||||
|
||||
use(z2);
|
||||
>use(z2) : any
|
||||
>use : (a: any) => any
|
||||
>z2 : undefined
|
||||
>z2 : any
|
||||
|
||||
use(z3);
|
||||
>use(z3) : any
|
||||
>use : (a: any) => any
|
||||
>z3 : undefined
|
||||
>z3 : any
|
||||
|
||||
var z6;
|
||||
>z6 : any
|
||||
@ -149,7 +149,7 @@ use(y);
|
||||
use(z6);
|
||||
>use(z6) : any
|
||||
>use : (a: any) => any
|
||||
>z6 : undefined
|
||||
>z6 : any
|
||||
|
||||
var z = false;
|
||||
>z : boolean
|
||||
|
||||
@ -83,22 +83,22 @@ use(x);
|
||||
use(z0);
|
||||
>use(z0) : any
|
||||
>use : (a: any) => any
|
||||
>z0 : undefined
|
||||
>z0 : any
|
||||
|
||||
use(z1);
|
||||
>use(z1) : any
|
||||
>use : (a: any) => any
|
||||
>z1 : undefined
|
||||
>z1 : any
|
||||
|
||||
use(z2);
|
||||
>use(z2) : any
|
||||
>use : (a: any) => any
|
||||
>z2 : undefined
|
||||
>z2 : any
|
||||
|
||||
use(z3);
|
||||
>use(z3) : any
|
||||
>use : (a: any) => any
|
||||
>z3 : undefined
|
||||
>z3 : any
|
||||
|
||||
var z6;
|
||||
>z6 : any
|
||||
@ -155,7 +155,7 @@ use(y);
|
||||
use(z6);
|
||||
>use(z6) : any
|
||||
>use : (a: any) => any
|
||||
>z6 : undefined
|
||||
>z6 : any
|
||||
|
||||
var z = false;
|
||||
>z : boolean
|
||||
|
||||
@ -1,24 +1,17 @@
|
||||
tests/cases/compiler/forIn.ts(2,10): error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation.
|
||||
tests/cases/compiler/forIn.ts(2,22): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
tests/cases/compiler/forIn.ts(7,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
tests/cases/compiler/forIn.ts(18,15): error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
tests/cases/compiler/forIn.ts(20,4): error TS2304: Cannot find name 'k'.
|
||||
|
||||
|
||||
==== tests/cases/compiler/forIn.ts (5 errors) ====
|
||||
==== tests/cases/compiler/forIn.ts (2 errors) ====
|
||||
var arr = null;
|
||||
for (var i:number in arr) { // error
|
||||
~
|
||||
!!! error TS2404: The left-hand side of a 'for...in' statement cannot use a type annotation.
|
||||
~~~
|
||||
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
var x1 = arr[i];
|
||||
var y1 = arr[i];
|
||||
}
|
||||
|
||||
for (var j in arr) { // ok
|
||||
~~~
|
||||
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
var x2 = arr[j];
|
||||
var y2 = arr[j];
|
||||
}
|
||||
@ -30,8 +23,6 @@ tests/cases/compiler/forIn.ts(20,4): error TS2304: Cannot find name 'k'.
|
||||
}
|
||||
|
||||
for (var l in arr) {
|
||||
~~~
|
||||
!!! error TS2407: The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.
|
||||
// error in the body
|
||||
k[l] = 1;
|
||||
~
|
||||
|
||||
@ -10,15 +10,15 @@ if (true) {
|
||||
>x0 : any
|
||||
|
||||
var obj1 = { x0: x0 };
|
||||
>obj1 : { x0: undefined; }
|
||||
>{ x0: x0 } : { x0: undefined; }
|
||||
>x0 : undefined
|
||||
>x0 : undefined
|
||||
>obj1 : { x0: any; }
|
||||
>{ x0: x0 } : { x0: any; }
|
||||
>x0 : any
|
||||
>x0 : any
|
||||
|
||||
var obj2 = { x0 };
|
||||
>obj2 : { x0: undefined; }
|
||||
>{ x0 } : { x0: undefined; }
|
||||
>x0 : undefined
|
||||
>obj2 : { x0: any; }
|
||||
>{ x0 } : { x0: any; }
|
||||
>x0 : any
|
||||
}
|
||||
|
||||
var x, y, z;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
=== tests/cases/compiler/json.stringify.ts ===
|
||||
|
||||
var value = null;
|
||||
>value : any
|
||||
>value : null
|
||||
>null : null
|
||||
|
||||
JSON.stringify(value, undefined, 2);
|
||||
|
||||
@ -35,12 +35,12 @@ use(data[0]() === data[1]());
|
||||
>use(data[0]() === data[1]()) : any
|
||||
>use : (a: any) => any
|
||||
>data[0]() === data[1]() : boolean
|
||||
>data[0]() : typeof C
|
||||
>data[0] : () => typeof C
|
||||
>data : (() => typeof C)[]
|
||||
>data[0]() : any
|
||||
>data[0] : any
|
||||
>data : any[]
|
||||
>0 : 0
|
||||
>data[1]() : typeof C
|
||||
>data[1] : () => typeof C
|
||||
>data : (() => typeof C)[]
|
||||
>data[1]() : any
|
||||
>data[1] : any
|
||||
>data : any[]
|
||||
>1 : 1
|
||||
|
||||
|
||||
@ -36,12 +36,12 @@ use(data[0]() === data[1]());
|
||||
>use(data[0]() === data[1]()) : any
|
||||
>use : (a: any) => any
|
||||
>data[0]() === data[1]() : boolean
|
||||
>data[0]() : typeof C
|
||||
>data[0] : () => typeof C
|
||||
>data : (() => typeof C)[]
|
||||
>data[0]() : any
|
||||
>data[0] : any
|
||||
>data : any[]
|
||||
>0 : 0
|
||||
>data[1]() : typeof C
|
||||
>data[1] : () => typeof C
|
||||
>data : (() => typeof C)[]
|
||||
>data[1]() : any
|
||||
>data[1] : any
|
||||
>data : any[]
|
||||
>1 : 1
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ function a1() {
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
>x < 1 : boolean
|
||||
>x : undefined
|
||||
>x : any
|
||||
>1 : 1
|
||||
|
||||
() => x;
|
||||
@ -53,24 +53,24 @@ function a2() {
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
>x < 1 : boolean
|
||||
>x : number
|
||||
>x : any
|
||||
>1 : 1
|
||||
|
||||
x = x + 1;
|
||||
>x = x + 1 : number
|
||||
>x = x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : number
|
||||
>x : number
|
||||
>1 : 1
|
||||
}
|
||||
for (let x;;) {
|
||||
>x : any
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : number
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : number
|
||||
>x : number
|
||||
>2 : 2
|
||||
}
|
||||
}
|
||||
@ -82,14 +82,14 @@ function a3() {
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
>x < 1 : boolean
|
||||
>x : number
|
||||
>x : any
|
||||
>1 : 1
|
||||
|
||||
x = x + 1;
|
||||
>x = x + 1 : number
|
||||
>x = x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : number
|
||||
>x : number
|
||||
>1 : 1
|
||||
}
|
||||
switch (1) {
|
||||
@ -111,14 +111,14 @@ function a4() {
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
>x < 1 : boolean
|
||||
>x : number
|
||||
>x : any
|
||||
>1 : 1
|
||||
|
||||
x = x + 1;
|
||||
>x = x + 1 : number
|
||||
>x = x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : number
|
||||
>x : number
|
||||
>1 : 1
|
||||
|
||||
() => x;
|
||||
@ -145,14 +145,14 @@ function a5() {
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
>x < 1 : boolean
|
||||
>x : number
|
||||
>x : any
|
||||
>1 : 1
|
||||
|
||||
x = x + 1;
|
||||
>x = x + 1 : number
|
||||
>x = x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : number
|
||||
>x : number
|
||||
>1 : 1
|
||||
|
||||
() => x;
|
||||
|
||||
@ -5,24 +5,24 @@ function a0() {
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
>x < 1 : boolean
|
||||
>x : number
|
||||
>x : any
|
||||
>1 : 1
|
||||
|
||||
x = x + 1;
|
||||
>x = x + 1 : number
|
||||
>x = x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : number
|
||||
>x : number
|
||||
>1 : 1
|
||||
}
|
||||
for (let x;;) {
|
||||
>x : any
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : number
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : number
|
||||
>x : number
|
||||
>2 : 2
|
||||
}
|
||||
}
|
||||
@ -33,14 +33,14 @@ function a1() {
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
>x < 1 : boolean
|
||||
>x : number
|
||||
>x : any
|
||||
>1 : 1
|
||||
|
||||
x = x + 1;
|
||||
>x = x + 1 : number
|
||||
>x = x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : number
|
||||
>x : number
|
||||
>1 : 1
|
||||
|
||||
() => x;
|
||||
@ -51,10 +51,10 @@ function a1() {
|
||||
>x : any
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : number
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : number
|
||||
>x : number
|
||||
>2 : 2
|
||||
}
|
||||
}
|
||||
@ -65,24 +65,24 @@ function a2() {
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
>x < 1 : boolean
|
||||
>x : number
|
||||
>x : any
|
||||
>1 : 1
|
||||
|
||||
x = x + 1;
|
||||
>x = x + 1 : number
|
||||
>x = x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : number
|
||||
>x : number
|
||||
>1 : 1
|
||||
}
|
||||
for (let x;;) {
|
||||
>x : any
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : number
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : number
|
||||
>x : number
|
||||
>2 : 2
|
||||
|
||||
() => x;
|
||||
@ -98,14 +98,14 @@ function a3() {
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
>x < 1 : boolean
|
||||
>x : number
|
||||
>x : any
|
||||
>1 : 1
|
||||
|
||||
x = x + 1;
|
||||
>x = x + 1 : number
|
||||
>x = x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : any
|
||||
>x : any
|
||||
>x + 1 : number
|
||||
>x : number
|
||||
>1 : 1
|
||||
|
||||
() => x;
|
||||
@ -116,10 +116,10 @@ function a3() {
|
||||
>x : any
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : number
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : number
|
||||
>x : number
|
||||
>2 : 2
|
||||
|
||||
() => x;
|
||||
|
||||
@ -18,10 +18,10 @@ function a0() {
|
||||
>x : any
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : number
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : number
|
||||
>x : number
|
||||
>2 : 2
|
||||
}
|
||||
}
|
||||
@ -49,10 +49,10 @@ function a1() {
|
||||
>x : any
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : number
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : number
|
||||
>x : number
|
||||
>2 : 2
|
||||
}
|
||||
}
|
||||
@ -76,10 +76,10 @@ function a2() {
|
||||
>x : any
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : number
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : number
|
||||
>x : number
|
||||
>2 : 2
|
||||
|
||||
() => x;
|
||||
@ -111,10 +111,10 @@ function a3() {
|
||||
>x : any
|
||||
|
||||
x = x + 2;
|
||||
>x = x + 2 : number
|
||||
>x = x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : any
|
||||
>x : any
|
||||
>x + 2 : number
|
||||
>x : number
|
||||
>2 : 2
|
||||
|
||||
() => x;
|
||||
|
||||
@ -5,10 +5,10 @@ var x=null;
|
||||
>null : null
|
||||
|
||||
var y=3+x;
|
||||
>y : number
|
||||
>3+x : number
|
||||
>y : any
|
||||
>3+x : any
|
||||
>3 : 3
|
||||
>x : null
|
||||
>x : any
|
||||
|
||||
var z=3+null;
|
||||
>z : number
|
||||
|
||||
@ -5,35 +5,35 @@ var a, b, c;
|
||||
>c : any
|
||||
|
||||
var x1 = {
|
||||
>x1 : { a: undefined; }
|
||||
>{ a} : { a: undefined; }
|
||||
>x1 : { a: any; }
|
||||
>{ a} : { a: any; }
|
||||
|
||||
a
|
||||
>a : undefined
|
||||
>a : any
|
||||
|
||||
};
|
||||
|
||||
var x2 = {
|
||||
>x2 : { a: undefined; }
|
||||
>{ a,} : { a: undefined; }
|
||||
>x2 : { a: any; }
|
||||
>{ a,} : { a: any; }
|
||||
|
||||
a,
|
||||
>a : undefined
|
||||
>a : any
|
||||
}
|
||||
|
||||
var x3 = {
|
||||
>x3 : any
|
||||
>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: undefined; c: undefined; d(): void; x3: any; parent: any; }
|
||||
>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: any; c: any; d(): void; x3: any; parent: any; }
|
||||
|
||||
a: 0,
|
||||
>a : number
|
||||
>0 : 0
|
||||
|
||||
b,
|
||||
>b : undefined
|
||||
>b : any
|
||||
|
||||
c,
|
||||
>c : undefined
|
||||
>c : any
|
||||
|
||||
d() { },
|
||||
>d : () => void
|
||||
|
||||
@ -5,35 +5,35 @@ var a, b, c;
|
||||
>c : any
|
||||
|
||||
var x1 = {
|
||||
>x1 : { a: undefined; }
|
||||
>{ a} : { a: undefined; }
|
||||
>x1 : { a: any; }
|
||||
>{ a} : { a: any; }
|
||||
|
||||
a
|
||||
>a : undefined
|
||||
>a : any
|
||||
|
||||
};
|
||||
|
||||
var x2 = {
|
||||
>x2 : { a: undefined; }
|
||||
>{ a,} : { a: undefined; }
|
||||
>x2 : { a: any; }
|
||||
>{ a,} : { a: any; }
|
||||
|
||||
a,
|
||||
>a : undefined
|
||||
>a : any
|
||||
}
|
||||
|
||||
var x3 = {
|
||||
>x3 : any
|
||||
>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: undefined; c: undefined; d(): void; x3: any; parent: any; }
|
||||
>{ a: 0, b, c, d() { }, x3, parent: x3} : { a: number; b: any; c: any; d(): void; x3: any; parent: any; }
|
||||
|
||||
a: 0,
|
||||
>a : number
|
||||
>0 : 0
|
||||
|
||||
b,
|
||||
>b : undefined
|
||||
>b : any
|
||||
|
||||
c,
|
||||
>c : undefined
|
||||
>c : any
|
||||
|
||||
d() { },
|
||||
>d : () => void
|
||||
|
||||
@ -25,6 +25,6 @@ var rest;
|
||||
>{ b, ...rest } = o : { a: string; b: string; x: number; }
|
||||
>{ b, ...rest } : any
|
||||
>b : any
|
||||
>rest : undefined
|
||||
>rest : any
|
||||
>o : { a: string; b: string; x: number; }
|
||||
|
||||
|
||||
@ -10,12 +10,12 @@ function f1() {
|
||||
if (a < b || b > (c + 1)) { }
|
||||
>a < b || b > (c + 1) : boolean
|
||||
>a < b : boolean
|
||||
>a : undefined
|
||||
>b : undefined
|
||||
>a : any
|
||||
>b : any
|
||||
>b > (c + 1) : boolean
|
||||
>b : undefined
|
||||
>(c + 1) : number
|
||||
>c + 1 : number
|
||||
>c : undefined
|
||||
>b : any
|
||||
>(c + 1) : any
|
||||
>c + 1 : any
|
||||
>c : any
|
||||
>1 : 1
|
||||
}
|
||||
|
||||
@ -10,12 +10,12 @@ function f() {
|
||||
if (a < b && b > (c + 1)) { }
|
||||
>a < b && b > (c + 1) : boolean
|
||||
>a < b : boolean
|
||||
>a : undefined
|
||||
>b : undefined
|
||||
>a : any
|
||||
>b : any
|
||||
>b > (c + 1) : boolean
|
||||
>b : undefined
|
||||
>(c + 1) : number
|
||||
>c + 1 : number
|
||||
>c : undefined
|
||||
>b : any
|
||||
>(c + 1) : any
|
||||
>c + 1 : any
|
||||
>c : any
|
||||
>1 : 1
|
||||
}
|
||||
|
||||
@ -10,13 +10,13 @@ function f() {
|
||||
if (a < b && b < (c + 1)) { }
|
||||
>a < b && b < (c + 1) : boolean
|
||||
>a < b : boolean
|
||||
>a : undefined
|
||||
>b : undefined
|
||||
>a : any
|
||||
>b : any
|
||||
>b < (c + 1) : boolean
|
||||
>b : undefined
|
||||
>(c + 1) : number
|
||||
>c + 1 : number
|
||||
>c : undefined
|
||||
>b : any
|
||||
>(c + 1) : any
|
||||
>c + 1 : any
|
||||
>c : any
|
||||
>1 : 1
|
||||
}
|
||||
|
||||
|
||||
@ -1,17 +1,11 @@
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserForStatement2.ts(4,13): error TS2538: Type 'undefined' cannot be used as an index type.
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserForStatement2.ts(4,20): error TS2538: Type 'undefined' cannot be used as an index type.
|
||||
tests/cases/conformance/parser/ecmascript5/Statements/parserForStatement2.ts(4,30): error TS2304: Cannot find name 'd'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserForStatement2.ts (3 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/Statements/parserForStatement2.ts (1 errors) ====
|
||||
var a;
|
||||
var b = [];
|
||||
var c;
|
||||
for (a in b[c] = b[c] || [], d) {
|
||||
~
|
||||
!!! error TS2538: Type 'undefined' cannot be used as an index type.
|
||||
~
|
||||
!!! error TS2538: Type 'undefined' cannot be used as an index type.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'd'.
|
||||
|
||||
|
||||
@ -25,9 +25,6 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(776,42): e
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(781,23): error TS2503: Cannot find namespace 'TypeScript'.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(794,49): error TS2304: Cannot find name 'TypeScript'.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(795,49): error TS2304: Cannot find name 'TypeScript'.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(820,31): error TS2339: Property 'length' does not exist on type 'null'.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(976,28): error TS2339: Property 'length' does not exist on type 'null'.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(977,82): error TS2339: Property 'join' does not exist on type 'null'.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(987,53): error TS2304: Cannot find name 'TypeScript'.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(987,89): error TS2304: Cannot find name 'TypeScript'.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(987,115): error TS2503: Cannot find namespace 'TypeScript'.
|
||||
@ -113,7 +110,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(1787,68):
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): error TS2304: Cannot find name 'Diff'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts (113 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts (110 errors) ====
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//
|
||||
@ -988,8 +985,6 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32):
|
||||
})
|
||||
|
||||
return errors.length === 0;
|
||||
~~~~~~
|
||||
!!! error TS2339: Property 'length' does not exist on type 'null'.
|
||||
}
|
||||
|
||||
public isSubtypeOf(other: Type) {
|
||||
@ -1146,11 +1141,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32):
|
||||
})
|
||||
|
||||
if (errors.length > 0)
|
||||
~~~~~~
|
||||
!!! error TS2339: Property 'length' does not exist on type 'null'.
|
||||
throw new Error("Type definition contains errors: " + errors.join(","));
|
||||
~~~~
|
||||
!!! error TS2339: Property 'join' does not exist on type 'null'.
|
||||
|
||||
var matchingIdentifiers: Type[] = [];
|
||||
|
||||
|
||||
@ -14,11 +14,11 @@ var WorkspacePrototype = {
|
||||
}
|
||||
};
|
||||
WorkspacePrototype['__proto__'] = EntityPrototype;
|
||||
>WorkspacePrototype['__proto__'] = EntityPrototype : undefined
|
||||
>WorkspacePrototype['__proto__'] = EntityPrototype : any
|
||||
>WorkspacePrototype['__proto__'] : any
|
||||
>WorkspacePrototype : { serialize: () => any; }
|
||||
>'__proto__' : "___proto__"
|
||||
>EntityPrototype : undefined
|
||||
>EntityPrototype : any
|
||||
|
||||
var o = {
|
||||
>o : { "__proto__": number; }
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
=== tests/cases/conformance/types/typeRelationships/widenedTypes/strictNullChecksNoWidening.ts ===
|
||||
|
||||
var a1 = null;
|
||||
>a1 : any
|
||||
>a1 : null
|
||||
>null : null
|
||||
|
||||
var a2 = undefined;
|
||||
>a2 : any
|
||||
>a2 : undefined
|
||||
>undefined : undefined
|
||||
|
||||
var a3 = void 0;
|
||||
@ -14,7 +14,7 @@ var a3 = void 0;
|
||||
>0 : 0
|
||||
|
||||
var b1 = [];
|
||||
>b1 : any[]
|
||||
>b1 : never[]
|
||||
>[] : never[]
|
||||
|
||||
var b2 = [,];
|
||||
|
||||
@ -61,7 +61,7 @@ var selfClosed7 = <div x={p} y='p' />;
|
||||
><div x={p} y='p' /> : JSX.Element
|
||||
>div : any
|
||||
>x : any
|
||||
>p : undefined
|
||||
>p : any
|
||||
>y : any
|
||||
|
||||
var openClosed1 = <div></div>;
|
||||
@ -82,7 +82,7 @@ var openClosed3 = <div n='m'>{p}</div>;
|
||||
><div n='m'>{p}</div> : JSX.Element
|
||||
>div : any
|
||||
>n : any
|
||||
>p : undefined
|
||||
>p : any
|
||||
>div : any
|
||||
|
||||
var openClosed4 = <div n='m'>{p < p}</div>;
|
||||
@ -91,8 +91,8 @@ var openClosed4 = <div n='m'>{p < p}</div>;
|
||||
>div : any
|
||||
>n : any
|
||||
>p < p : boolean
|
||||
>p : undefined
|
||||
>p : undefined
|
||||
>p : any
|
||||
>p : any
|
||||
>div : any
|
||||
|
||||
var openClosed5 = <div n='m'>{p > p}</div>;
|
||||
@ -101,8 +101,8 @@ var openClosed5 = <div n='m'>{p > p}</div>;
|
||||
>div : any
|
||||
>n : any
|
||||
>p > p : boolean
|
||||
>p : undefined
|
||||
>p : undefined
|
||||
>p : any
|
||||
>p : any
|
||||
>div : any
|
||||
|
||||
class SomeClass {
|
||||
@ -180,7 +180,7 @@ var whitespace2 = <div> {p} </div>;
|
||||
>whitespace2 : JSX.Element
|
||||
><div> {p} </div> : JSX.Element
|
||||
>div : any
|
||||
>p : undefined
|
||||
>p : any
|
||||
>div : any
|
||||
|
||||
var whitespace3 = <div>
|
||||
@ -189,7 +189,7 @@ var whitespace3 = <div>
|
||||
>div : any
|
||||
|
||||
{p}
|
||||
>p : undefined
|
||||
>p : any
|
||||
|
||||
</div>;
|
||||
>div : any
|
||||
|
||||
@ -22,16 +22,16 @@ var spreads1 = <div {...p1}>{p2}</div>;
|
||||
>spreads1 : JSX.Element
|
||||
><div {...p1}>{p2}</div> : JSX.Element
|
||||
>div : any
|
||||
>p1 : undefined
|
||||
>p2 : undefined
|
||||
>p1 : any
|
||||
>p2 : any
|
||||
>div : any
|
||||
|
||||
var spreads2 = <div {...p1}>{p2}</div>;
|
||||
>spreads2 : JSX.Element
|
||||
><div {...p1}>{p2}</div> : JSX.Element
|
||||
>div : any
|
||||
>p1 : undefined
|
||||
>p2 : undefined
|
||||
>p1 : any
|
||||
>p2 : any
|
||||
>div : any
|
||||
|
||||
var spreads3 = <div x={p3} {...p1}>{p2}</div>;
|
||||
@ -39,19 +39,19 @@ var spreads3 = <div x={p3} {...p1}>{p2}</div>;
|
||||
><div x={p3} {...p1}>{p2}</div> : JSX.Element
|
||||
>div : any
|
||||
>x : any
|
||||
>p3 : undefined
|
||||
>p1 : undefined
|
||||
>p2 : undefined
|
||||
>p3 : any
|
||||
>p1 : any
|
||||
>p2 : any
|
||||
>div : any
|
||||
|
||||
var spreads4 = <div {...p1} x={p3} >{p2}</div>;
|
||||
>spreads4 : JSX.Element
|
||||
><div {...p1} x={p3} >{p2}</div> : JSX.Element
|
||||
>div : any
|
||||
>p1 : undefined
|
||||
>p1 : any
|
||||
>x : any
|
||||
>p3 : undefined
|
||||
>p2 : undefined
|
||||
>p3 : any
|
||||
>p2 : any
|
||||
>div : any
|
||||
|
||||
var spreads5 = <div x={p2} {...p1} y={p3}>{p2}</div>;
|
||||
@ -59,10 +59,10 @@ var spreads5 = <div x={p2} {...p1} y={p3}>{p2}</div>;
|
||||
><div x={p2} {...p1} y={p3}>{p2}</div> : JSX.Element
|
||||
>div : any
|
||||
>x : any
|
||||
>p2 : undefined
|
||||
>p1 : undefined
|
||||
>p2 : any
|
||||
>p1 : any
|
||||
>y : any
|
||||
>p3 : undefined
|
||||
>p2 : undefined
|
||||
>p3 : any
|
||||
>p2 : any
|
||||
>div : any
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ var selfClosed7 = <div x={p} y='p' b />;
|
||||
><div x={p} y='p' b /> : JSX.Element
|
||||
>div : any
|
||||
>x : any
|
||||
>p : undefined
|
||||
>p : any
|
||||
>y : any
|
||||
>b : any
|
||||
|
||||
@ -85,7 +85,7 @@ var openClosed3 = <div n='m'>{p}</div>;
|
||||
><div n='m'>{p}</div> : JSX.Element
|
||||
>div : any
|
||||
>n : any
|
||||
>p : undefined
|
||||
>p : any
|
||||
>div : any
|
||||
|
||||
var openClosed4 = <div n='m'>{p < p}</div>;
|
||||
@ -94,8 +94,8 @@ var openClosed4 = <div n='m'>{p < p}</div>;
|
||||
>div : any
|
||||
>n : any
|
||||
>p < p : boolean
|
||||
>p : undefined
|
||||
>p : undefined
|
||||
>p : any
|
||||
>p : any
|
||||
>div : any
|
||||
|
||||
var openClosed5 = <div n='m' b>{p > p}</div>;
|
||||
@ -105,8 +105,8 @@ var openClosed5 = <div n='m' b>{p > p}</div>;
|
||||
>n : any
|
||||
>b : any
|
||||
>p > p : boolean
|
||||
>p : undefined
|
||||
>p : undefined
|
||||
>p : any
|
||||
>p : any
|
||||
>div : any
|
||||
|
||||
class SomeClass {
|
||||
@ -184,7 +184,7 @@ var whitespace2 = <div> {p} </div>;
|
||||
>whitespace2 : JSX.Element
|
||||
><div> {p} </div> : JSX.Element
|
||||
>div : any
|
||||
>p : undefined
|
||||
>p : any
|
||||
>div : any
|
||||
|
||||
var whitespace3 = <div>
|
||||
@ -193,7 +193,7 @@ var whitespace3 = <div>
|
||||
>div : any
|
||||
|
||||
{p}
|
||||
>p : undefined
|
||||
>p : any
|
||||
|
||||
</div>;
|
||||
>div : any
|
||||
|
||||
@ -24,16 +24,16 @@ var spreads1 = <div {...p1}>{p2}</div>;
|
||||
>spreads1 : JSX.Element
|
||||
><div {...p1}>{p2}</div> : JSX.Element
|
||||
>div : any
|
||||
>p1 : undefined
|
||||
>p2 : undefined
|
||||
>p1 : any
|
||||
>p2 : any
|
||||
>div : any
|
||||
|
||||
var spreads2 = <div {...p1}>{p2}</div>;
|
||||
>spreads2 : JSX.Element
|
||||
><div {...p1}>{p2}</div> : JSX.Element
|
||||
>div : any
|
||||
>p1 : undefined
|
||||
>p2 : undefined
|
||||
>p1 : any
|
||||
>p2 : any
|
||||
>div : any
|
||||
|
||||
var spreads3 = <div x={p3} {...p1}>{p2}</div>;
|
||||
@ -41,19 +41,19 @@ var spreads3 = <div x={p3} {...p1}>{p2}</div>;
|
||||
><div x={p3} {...p1}>{p2}</div> : JSX.Element
|
||||
>div : any
|
||||
>x : any
|
||||
>p3 : undefined
|
||||
>p1 : undefined
|
||||
>p2 : undefined
|
||||
>p3 : any
|
||||
>p1 : any
|
||||
>p2 : any
|
||||
>div : any
|
||||
|
||||
var spreads4 = <div {...p1} x={p3} >{p2}</div>;
|
||||
>spreads4 : JSX.Element
|
||||
><div {...p1} x={p3} >{p2}</div> : JSX.Element
|
||||
>div : any
|
||||
>p1 : undefined
|
||||
>p1 : any
|
||||
>x : any
|
||||
>p3 : undefined
|
||||
>p2 : undefined
|
||||
>p3 : any
|
||||
>p2 : any
|
||||
>div : any
|
||||
|
||||
var spreads5 = <div x={p2} {...p1} y={p3}>{p2}</div>;
|
||||
@ -61,10 +61,10 @@ var spreads5 = <div x={p2} {...p1} y={p3}>{p2}</div>;
|
||||
><div x={p2} {...p1} y={p3}>{p2}</div> : JSX.Element
|
||||
>div : any
|
||||
>x : any
|
||||
>p2 : undefined
|
||||
>p1 : undefined
|
||||
>p2 : any
|
||||
>p1 : any
|
||||
>y : any
|
||||
>p3 : undefined
|
||||
>p2 : undefined
|
||||
>p3 : any
|
||||
>p2 : any
|
||||
>div : any
|
||||
|
||||
|
||||
@ -32,6 +32,6 @@ var spread1 = <div x='' {...foo} y='' />;
|
||||
><div x='' {...foo} y='' /> : JSX.Element
|
||||
>div : any
|
||||
>x : any
|
||||
>foo : undefined
|
||||
>foo : any
|
||||
>y : any
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ namespace M {
|
||||
><div x='' {...foo} y='' /> : JSX.Element
|
||||
>div : any
|
||||
>x : any
|
||||
>foo : undefined
|
||||
>foo : any
|
||||
>y : any
|
||||
|
||||
// Quotes
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
tests/cases/compiler/file1.ts(3,12): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
|
||||
|
||||
==== tests/cases/compiler/file2.ts (0 errors) ====
|
||||
import f = require('./file1');
|
||||
f.foo();
|
||||
|
||||
==== tests/cases/compiler/file1.ts (1 errors) ====
|
||||
export function foo() {
|
||||
var classes = undefined;
|
||||
return new classes(null);
|
||||
~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature.
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
=== tests/cases/compiler/typedArrays.ts ===
|
||||
|
||||
function CreateTypedArrayTypes() {
|
||||
>CreateTypedArrayTypes : () => (Int8ArrayConstructor | Uint8ArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor | Uint8ClampedArrayConstructor)[]
|
||||
>CreateTypedArrayTypes : () => any[]
|
||||
|
||||
var typedArrays = [];
|
||||
>typedArrays : any[]
|
||||
@ -71,11 +71,11 @@ function CreateTypedArrayTypes() {
|
||||
>Uint8ClampedArray : Uint8ClampedArrayConstructor
|
||||
|
||||
return typedArrays;
|
||||
>typedArrays : (Int8ArrayConstructor | Uint8ArrayConstructor | Int16ArrayConstructor | Uint16ArrayConstructor | Int32ArrayConstructor | Uint32ArrayConstructor | Float32ArrayConstructor | Float64ArrayConstructor | Uint8ClampedArrayConstructor)[]
|
||||
>typedArrays : any[]
|
||||
}
|
||||
|
||||
function CreateTypedArrayInstancesFromLength(obj: number) {
|
||||
>CreateTypedArrayInstancesFromLength : (obj: number) => (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>CreateTypedArrayInstancesFromLength : (obj: number) => any[]
|
||||
>obj : number
|
||||
|
||||
var typedArrays = [];
|
||||
@ -164,11 +164,11 @@ function CreateTypedArrayInstancesFromLength(obj: number) {
|
||||
>obj : number
|
||||
|
||||
return typedArrays;
|
||||
>typedArrays : (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>typedArrays : any[]
|
||||
}
|
||||
|
||||
function CreateTypedArrayInstancesFromArray(obj: number[]) {
|
||||
>CreateTypedArrayInstancesFromArray : (obj: number[]) => (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>CreateTypedArrayInstancesFromArray : (obj: number[]) => any[]
|
||||
>obj : number[]
|
||||
|
||||
var typedArrays = [];
|
||||
@ -257,11 +257,11 @@ function CreateTypedArrayInstancesFromArray(obj: number[]) {
|
||||
>obj : number[]
|
||||
|
||||
return typedArrays;
|
||||
>typedArrays : (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>typedArrays : any[]
|
||||
}
|
||||
|
||||
function CreateIntegerTypedArraysFromArray2(obj:number[]) {
|
||||
>CreateIntegerTypedArraysFromArray2 : (obj: number[]) => (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>CreateIntegerTypedArraysFromArray2 : (obj: number[]) => any[]
|
||||
>obj : number[]
|
||||
|
||||
var typedArrays = [];
|
||||
@ -368,11 +368,11 @@ function CreateIntegerTypedArraysFromArray2(obj:number[]) {
|
||||
>obj : number[]
|
||||
|
||||
return typedArrays;
|
||||
>typedArrays : (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>typedArrays : any[]
|
||||
}
|
||||
|
||||
function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike<number>) {
|
||||
>CreateIntegerTypedArraysFromArrayLike : (obj: ArrayLike<number>) => (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>CreateIntegerTypedArraysFromArrayLike : (obj: ArrayLike<number>) => any[]
|
||||
>obj : ArrayLike<number>
|
||||
>ArrayLike : ArrayLike<T>
|
||||
|
||||
@ -480,11 +480,11 @@ function CreateIntegerTypedArraysFromArrayLike(obj:ArrayLike<number>) {
|
||||
>obj : ArrayLike<number>
|
||||
|
||||
return typedArrays;
|
||||
>typedArrays : (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>typedArrays : any[]
|
||||
}
|
||||
|
||||
function CreateTypedArraysOf(obj) {
|
||||
>CreateTypedArraysOf : (obj: any) => (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>CreateTypedArraysOf : (obj: any) => any[]
|
||||
>obj : any
|
||||
|
||||
var typedArrays = [];
|
||||
@ -600,11 +600,11 @@ function CreateTypedArraysOf(obj) {
|
||||
>obj : any
|
||||
|
||||
return typedArrays;
|
||||
>typedArrays : (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>typedArrays : any[]
|
||||
}
|
||||
|
||||
function CreateTypedArraysOf2() {
|
||||
>CreateTypedArraysOf2 : () => (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>CreateTypedArraysOf2 : () => any[]
|
||||
|
||||
var typedArrays = [];
|
||||
>typedArrays : any[]
|
||||
@ -737,11 +737,11 @@ function CreateTypedArraysOf2() {
|
||||
>4 : 4
|
||||
|
||||
return typedArrays;
|
||||
>typedArrays : (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>typedArrays : any[]
|
||||
}
|
||||
|
||||
function CreateTypedArraysFromMapFn(obj:ArrayLike<number>, mapFn: (n:number, v:number)=> number) {
|
||||
>CreateTypedArraysFromMapFn : (obj: ArrayLike<number>, mapFn: (n: number, v: number) => number) => (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>CreateTypedArraysFromMapFn : (obj: ArrayLike<number>, mapFn: (n: number, v: number) => number) => any[]
|
||||
>obj : ArrayLike<number>
|
||||
>ArrayLike : ArrayLike<T>
|
||||
>mapFn : (n: number, v: number) => number
|
||||
@ -861,11 +861,11 @@ function CreateTypedArraysFromMapFn(obj:ArrayLike<number>, mapFn: (n:number, v:n
|
||||
>mapFn : (n: number, v: number) => number
|
||||
|
||||
return typedArrays;
|
||||
>typedArrays : (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>typedArrays : any[]
|
||||
}
|
||||
|
||||
function CreateTypedArraysFromThisObj(obj:ArrayLike<number>, mapFn: (n:number, v:number)=> number, thisArg: {}) {
|
||||
>CreateTypedArraysFromThisObj : (obj: ArrayLike<number>, mapFn: (n: number, v: number) => number, thisArg: {}) => (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>CreateTypedArraysFromThisObj : (obj: ArrayLike<number>, mapFn: (n: number, v: number) => number, thisArg: {}) => any[]
|
||||
>obj : ArrayLike<number>
|
||||
>ArrayLike : ArrayLike<T>
|
||||
>mapFn : (n: number, v: number) => number
|
||||
@ -995,5 +995,5 @@ function CreateTypedArraysFromThisObj(obj:ArrayLike<number>, mapFn: (n:number, v
|
||||
>thisArg : {}
|
||||
|
||||
return typedArrays;
|
||||
>typedArrays : (Int8Array | Uint8Array | Uint8ClampedArray | Int16Array | Uint16Array | Int32Array | Uint32Array | Float32Array | Float64Array)[]
|
||||
>typedArrays : any[]
|
||||
}
|
||||
|
||||
@ -4,10 +4,9 @@ tests/cases/compiler/unusedSwitchStatment.ts(7,15): error TS6133: 'c' is declare
|
||||
tests/cases/compiler/unusedSwitchStatment.ts(10,13): error TS6133: 'z' is declared but never used.
|
||||
tests/cases/compiler/unusedSwitchStatment.ts(15,10): error TS2678: Type '0' is not comparable to type '2'.
|
||||
tests/cases/compiler/unusedSwitchStatment.ts(17,10): error TS2678: Type '1' is not comparable to type '2'.
|
||||
tests/cases/compiler/unusedSwitchStatment.ts(18,9): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
||||
|
||||
|
||||
==== tests/cases/compiler/unusedSwitchStatment.ts (7 errors) ====
|
||||
==== tests/cases/compiler/unusedSwitchStatment.ts (6 errors) ====
|
||||
|
||||
switch (1) {
|
||||
case 0:
|
||||
@ -38,6 +37,4 @@ tests/cases/compiler/unusedSwitchStatment.ts(18,9): error TS2356: An arithmetic
|
||||
~
|
||||
!!! error TS2678: Type '1' is not comparable to type '2'.
|
||||
x++;
|
||||
~
|
||||
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user