mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 20:37:00 -05:00
Accepting new baselines
This commit is contained in:
@@ -4,7 +4,7 @@ let cond: boolean;
|
||||
>cond : boolean
|
||||
|
||||
function ff() {
|
||||
>ff : () => void
|
||||
>ff : () => never
|
||||
|
||||
let x: string | undefined;
|
||||
>x : string | undefined
|
||||
|
||||
@@ -7,7 +7,7 @@ while (true) {
|
||||
>true : boolean
|
||||
|
||||
function f() {
|
||||
>f : () => void
|
||||
>f : () => never
|
||||
|
||||
target:
|
||||
>target : any
|
||||
|
||||
@@ -16,7 +16,7 @@ for (var x = <number>undefined; ;) { }
|
||||
|
||||
// new declaration space, making redeclaring x as a string valid
|
||||
function declSpace() {
|
||||
>declSpace : () => void
|
||||
>declSpace : () => never
|
||||
|
||||
for (var x = 'this is a string'; ;) { }
|
||||
>x : string
|
||||
|
||||
@@ -133,8 +133,8 @@ function fn5(x: Derived1) {
|
||||
// 1.5: y: Derived1
|
||||
// Want: ???
|
||||
let y = x;
|
||||
>y : nothing
|
||||
>x : nothing
|
||||
>y : never
|
||||
>x : never
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ function isB(x: any): x is B {
|
||||
}
|
||||
|
||||
function f1(x: A | B) {
|
||||
>f1 : (x: A | B) => void
|
||||
>f1 : (x: A | B) => never
|
||||
>x : A | B
|
||||
>A : A
|
||||
>B : B
|
||||
@@ -78,7 +78,7 @@ function f1(x: A | B) {
|
||||
}
|
||||
|
||||
function f2(x: A | B) {
|
||||
>f2 : (x: A | B) => void
|
||||
>f2 : (x: A | B) => never
|
||||
>x : A | B
|
||||
>A : A
|
||||
>B : B
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings3.ts ===
|
||||
function a0() {
|
||||
>a0 : () => void
|
||||
>a0 : () => never
|
||||
{
|
||||
for (let x = 0; x < 1; ) {
|
||||
>x : number
|
||||
@@ -26,7 +26,7 @@ function a0() {
|
||||
}
|
||||
|
||||
function a1() {
|
||||
>a1 : () => void
|
||||
>a1 : () => never
|
||||
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
@@ -48,7 +48,7 @@ function a1() {
|
||||
}
|
||||
|
||||
function a2() {
|
||||
>a2 : () => void
|
||||
>a2 : () => never
|
||||
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings4.ts ===
|
||||
function a0() {
|
||||
>a0 : () => void
|
||||
>a0 : () => never
|
||||
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
@@ -28,7 +28,7 @@ function a0() {
|
||||
}
|
||||
|
||||
function a1() {
|
||||
>a1 : () => void
|
||||
>a1 : () => never
|
||||
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
@@ -60,7 +60,7 @@ function a1() {
|
||||
}
|
||||
|
||||
function a2() {
|
||||
>a2 : () => void
|
||||
>a2 : () => never
|
||||
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
@@ -93,7 +93,7 @@ function a2() {
|
||||
|
||||
|
||||
function a3() {
|
||||
>a3 : () => void
|
||||
>a3 : () => never
|
||||
|
||||
for (let x; x < 1;) {
|
||||
>x : any
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
=== tests/cases/compiler/nestedBlockScopedBindings6.ts ===
|
||||
function a0() {
|
||||
>a0 : () => void
|
||||
>a0 : () => never
|
||||
|
||||
for (let x of [1]) {
|
||||
>x : number
|
||||
@@ -27,7 +27,7 @@ function a0() {
|
||||
}
|
||||
|
||||
function a1() {
|
||||
>a1 : () => void
|
||||
>a1 : () => never
|
||||
|
||||
for (let x of [1]) {
|
||||
>x : number
|
||||
@@ -58,7 +58,7 @@ function a1() {
|
||||
}
|
||||
|
||||
function a2() {
|
||||
>a2 : () => void
|
||||
>a2 : () => never
|
||||
|
||||
for (let x of [1]) {
|
||||
>x : number
|
||||
@@ -89,7 +89,7 @@ function a2() {
|
||||
}
|
||||
|
||||
function a3() {
|
||||
>a3 : () => void
|
||||
>a3 : () => never
|
||||
|
||||
for (let x of [1]) {
|
||||
>x : number
|
||||
|
||||
@@ -7,7 +7,7 @@ while (true) {
|
||||
>true : boolean
|
||||
|
||||
function f() {
|
||||
>f : () => void
|
||||
>f : () => never
|
||||
|
||||
target:
|
||||
>target : any
|
||||
|
||||
@@ -63,7 +63,7 @@ var x3 = f1()
|
||||
.then(f2, (e: Error) => {
|
||||
>then : { <TResult>(onfulfilled?: (value: T1) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>; <TResult>(onfulfilled?: (value: T1) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): Promise<TResult>; }
|
||||
>f2 : (x: T1) => T2
|
||||
>(e: Error) => { throw e;} : (e: Error) => void
|
||||
>(e: Error) => { throw e;} : (e: Error) => never
|
||||
>e : Error
|
||||
>Error : Error
|
||||
|
||||
|
||||
@@ -116,6 +116,6 @@ if (!hasKind(x, "B")) {
|
||||
}
|
||||
else {
|
||||
let d = x;
|
||||
>d : nothing
|
||||
>x : nothing
|
||||
>d : never
|
||||
>x : never
|
||||
}
|
||||
|
||||
@@ -110,6 +110,6 @@ if (!hasKind(x, "B")) {
|
||||
}
|
||||
else {
|
||||
let d = x;
|
||||
>d : nothing
|
||||
>x : nothing
|
||||
>d : never
|
||||
>x : never
|
||||
}
|
||||
|
||||
@@ -113,6 +113,6 @@ if (!hasKind(x, "B")) {
|
||||
}
|
||||
else {
|
||||
let d = x;
|
||||
>d : nothing
|
||||
>x : nothing
|
||||
>d : never
|
||||
>x : never
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
=== tests/cases/conformance/statements/throwStatements/throwInEnclosingStatements.ts ===
|
||||
|
||||
function fn(x) {
|
||||
>fn : (x: any) => void
|
||||
>fn : (x: any) => never
|
||||
>x : any
|
||||
|
||||
throw x;
|
||||
@@ -9,7 +9,7 @@ function fn(x) {
|
||||
}
|
||||
|
||||
<T>(x: T) => { throw x; }
|
||||
><T>(x: T) => { throw x; } : <T>(x: T) => void
|
||||
><T>(x: T) => { throw x; } : <T>(x: T) => never
|
||||
>T : T
|
||||
>x : T
|
||||
>T : T
|
||||
@@ -78,7 +78,7 @@ class C<T> {
|
||||
>T : T
|
||||
|
||||
biz() {
|
||||
>biz : () => void
|
||||
>biz : () => never
|
||||
|
||||
throw this.value;
|
||||
>this.value : T
|
||||
@@ -93,15 +93,15 @@ class C<T> {
|
||||
}
|
||||
|
||||
var aa = {
|
||||
>aa : { id: number; biz(): void; }
|
||||
>{ id:12, biz() { throw this; }} : { id: number; biz(): void; }
|
||||
>aa : { id: number; biz(): never; }
|
||||
>{ id:12, biz() { throw this; }} : { id: number; biz(): never; }
|
||||
|
||||
id:12,
|
||||
>id : number
|
||||
>12 : number
|
||||
|
||||
biz() {
|
||||
>biz : () => void
|
||||
>biz : () => never
|
||||
|
||||
throw this;
|
||||
>this : any
|
||||
|
||||
@@ -121,7 +121,7 @@ if (typeof strOrNum === "boolean") {
|
||||
|
||||
let z1: {} = strOrNum; // {}
|
||||
>z1 : {}
|
||||
>strOrNum : nothing
|
||||
>strOrNum : never
|
||||
}
|
||||
else {
|
||||
let z2: string | number = strOrNum; // string | number
|
||||
@@ -215,6 +215,6 @@ if (typeof strOrNum !== "boolean") {
|
||||
else {
|
||||
let z2: {} = strOrNum; // {}
|
||||
>z2 : {}
|
||||
>strOrNum : nothing
|
||||
>strOrNum : never
|
||||
}
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ if (typeof strOrBool === "number") {
|
||||
|
||||
let y1: {} = strOrBool; // {}
|
||||
>y1 : {}
|
||||
>strOrBool : nothing
|
||||
>strOrBool : never
|
||||
}
|
||||
else {
|
||||
let y2: string | boolean = strOrBool; // string | boolean
|
||||
@@ -212,6 +212,6 @@ if (typeof strOrBool !== "number") {
|
||||
else {
|
||||
let y2: {} = strOrBool; // {}
|
||||
>y2 : {}
|
||||
>strOrBool : nothing
|
||||
>strOrBool : never
|
||||
}
|
||||
|
||||
|
||||
@@ -105,7 +105,7 @@ if (typeof strOrNumOrBool === "Object") {
|
||||
|
||||
let q1: {} = strOrNumOrBool; // {}
|
||||
>q1 : {}
|
||||
>strOrNumOrBool : nothing
|
||||
>strOrNumOrBool : never
|
||||
}
|
||||
else {
|
||||
let q2: string | number | boolean = strOrNumOrBool; // string | number | boolean
|
||||
@@ -178,6 +178,6 @@ if (typeof strOrNumOrBool !== "Object") {
|
||||
else {
|
||||
let q2: {} = strOrNumOrBool; // {}
|
||||
>q2 : {}
|
||||
>strOrNumOrBool : nothing
|
||||
>strOrNumOrBool : never
|
||||
}
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ if (typeof numOrBool === "string") {
|
||||
|
||||
let x1: {} = numOrBool; // {}
|
||||
>x1 : {}
|
||||
>numOrBool : nothing
|
||||
>numOrBool : never
|
||||
}
|
||||
else {
|
||||
let x2: number | boolean = numOrBool; // number | boolean
|
||||
@@ -214,6 +214,6 @@ if (typeof numOrBool !== "string") {
|
||||
else {
|
||||
let x2: {} = numOrBool; // {}
|
||||
>x2 : {}
|
||||
>numOrBool : nothing
|
||||
>numOrBool : never
|
||||
}
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ function f4() {
|
||||
>"boolean" : string
|
||||
|
||||
x; // nothing (boolean not in declared type)
|
||||
>x : nothing
|
||||
>x : never
|
||||
}
|
||||
x; // undefined
|
||||
>x : undefined
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOf.ts(7,20): error TS2339: Property 'global' does not exist on type 'nothing'.
|
||||
tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOf.ts(7,20): error TS2339: Property 'global' does not exist on type 'never'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOf.ts (1 errors) ====
|
||||
@@ -10,5 +10,5 @@ tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOf.ts(7,20)
|
||||
result = result2;
|
||||
} else if (!result.global) {
|
||||
~~~~~~
|
||||
!!! error TS2339: Property 'global' does not exist on type 'nothing'.
|
||||
!!! error TS2339: Property 'global' does not exist on type 'never'.
|
||||
}
|
||||
Reference in New Issue
Block a user