Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Accepting new baselines
  • Loading branch information
ahejlsberg committed May 17, 2016
commit e028c0fd3d31abd68a00418548635ab7d2459cba
2 changes: 1 addition & 1 deletion tests/baselines/reference/controlFlowIteration.types
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ let cond: boolean;
>cond : boolean

function ff() {
>ff : () => void
>ff : () => never

let x: string | undefined;
>x : string | undefined
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/duplicateLabel3.types
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ while (true) {
>true : boolean

function f() {
>f : () => void
>f : () => never

target:
>target : any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/baselines/reference/instanceOfAssignability.types
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ function fn5(x: Derived1) {
// 1.5: y: Derived1
// Want: ???
let y = x;
>y : nothing
>x : nothing
>y : never
>x : never
}
}

Expand Down
4 changes: 2 additions & 2 deletions tests/baselines/reference/narrowingOfDottedNames.types
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/baselines/reference/nestedBlockScopedBindings3.types
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=== tests/cases/compiler/nestedBlockScopedBindings3.ts ===
function a0() {
>a0 : () => void
>a0 : () => never
{
for (let x = 0; x < 1; ) {
>x : number
Expand All @@ -26,7 +26,7 @@ function a0() {
}

function a1() {
>a1 : () => void
>a1 : () => never

for (let x; x < 1;) {
>x : any
Expand All @@ -48,7 +48,7 @@ function a1() {
}

function a2() {
>a2 : () => void
>a2 : () => never

for (let x; x < 1;) {
>x : any
Expand Down
8 changes: 4 additions & 4 deletions tests/baselines/reference/nestedBlockScopedBindings4.types
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=== tests/cases/compiler/nestedBlockScopedBindings4.ts ===
function a0() {
>a0 : () => void
>a0 : () => never

for (let x; x < 1;) {
>x : any
Expand Down Expand Up @@ -28,7 +28,7 @@ function a0() {
}

function a1() {
>a1 : () => void
>a1 : () => never

for (let x; x < 1;) {
>x : any
Expand Down Expand Up @@ -60,7 +60,7 @@ function a1() {
}

function a2() {
>a2 : () => void
>a2 : () => never

for (let x; x < 1;) {
>x : any
Expand Down Expand Up @@ -93,7 +93,7 @@ function a2() {


function a3() {
>a3 : () => void
>a3 : () => never

for (let x; x < 1;) {
>x : any
Expand Down
8 changes: 4 additions & 4 deletions tests/baselines/reference/nestedBlockScopedBindings6.types
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
=== tests/cases/compiler/nestedBlockScopedBindings6.ts ===
function a0() {
>a0 : () => void
>a0 : () => never

for (let x of [1]) {
>x : number
Expand All @@ -27,7 +27,7 @@ function a0() {
}

function a1() {
>a1 : () => void
>a1 : () => never

for (let x of [1]) {
>x : number
Expand Down Expand Up @@ -58,7 +58,7 @@ function a1() {
}

function a2() {
>a2 : () => void
>a2 : () => never

for (let x of [1]) {
>x : number
Expand Down Expand Up @@ -89,7 +89,7 @@ function a2() {
}

function a3() {
>a3 : () => void
>a3 : () => never

for (let x of [1]) {
>x : number
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/parser_duplicateLabel3.types
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ while (true) {
>true : boolean

function f() {
>f : () => void
>f : () => never

target:
>target : any
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/promiseVoidErrorCallback.types
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions tests/baselines/reference/stringLiteralTypesAsTags01.types
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,6 @@ if (!hasKind(x, "B")) {
}
else {
let d = x;
>d : nothing
>x : nothing
>d : never
>x : never
}
4 changes: 2 additions & 2 deletions tests/baselines/reference/stringLiteralTypesAsTags02.types
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,6 @@ if (!hasKind(x, "B")) {
}
else {
let d = x;
>d : nothing
>x : nothing
>d : never
>x : never
}
4 changes: 2 additions & 2 deletions tests/baselines/reference/stringLiteralTypesAsTags03.types
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,6 @@ if (!hasKind(x, "B")) {
}
else {
let d = x;
>d : nothing
>x : nothing
>d : never
>x : never
}
12 changes: 6 additions & 6 deletions tests/baselines/reference/throwInEnclosingStatements.types
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
=== tests/cases/conformance/statements/throwStatements/throwInEnclosingStatements.ts ===

function fn(x) {
>fn : (x: any) => void
>fn : (x: any) => never
>x : any

throw x;
>x : any
}

<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
Expand Down Expand Up @@ -78,7 +78,7 @@ class C<T> {
>T : T

biz() {
>biz : () => void
>biz : () => never

throw this.value;
>this.value : T
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/baselines/reference/typeGuardOfFormTypeOfBoolean.types
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ if (typeof strOrNum === "boolean") {

let z1: {} = strOrNum; // {}
>z1 : {}
>strOrNum : nothing
>strOrNum : never
}
else {
let z2: string | number = strOrNum; // string | number
Expand Down Expand Up @@ -215,6 +215,6 @@ if (typeof strOrNum !== "boolean") {
else {
let z2: {} = strOrNum; // {}
>z2 : {}
>strOrNum : nothing
>strOrNum : never
}

4 changes: 2 additions & 2 deletions tests/baselines/reference/typeGuardOfFormTypeOfNumber.types
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ if (typeof strOrBool === "number") {

let y1: {} = strOrBool; // {}
>y1 : {}
>strOrBool : nothing
>strOrBool : never
}
else {
let y2: string | boolean = strOrBool; // string | boolean
Expand Down Expand Up @@ -212,6 +212,6 @@ if (typeof strOrBool !== "number") {
else {
let y2: {} = strOrBool; // {}
>y2 : {}
>strOrBool : nothing
>strOrBool : never
}

4 changes: 2 additions & 2 deletions tests/baselines/reference/typeGuardOfFormTypeOfOther.types
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -178,6 +178,6 @@ if (typeof strOrNumOrBool !== "Object") {
else {
let q2: {} = strOrNumOrBool; // {}
>q2 : {}
>strOrNumOrBool : nothing
>strOrNumOrBool : never
}

4 changes: 2 additions & 2 deletions tests/baselines/reference/typeGuardOfFormTypeOfString.types
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ if (typeof numOrBool === "string") {

let x1: {} = numOrBool; // {}
>x1 : {}
>numOrBool : nothing
>numOrBool : never
}
else {
let x2: number | boolean = numOrBool; // number | boolean
Expand Down Expand Up @@ -214,6 +214,6 @@ if (typeof numOrBool !== "string") {
else {
let x2: {} = numOrBool; // {}
>x2 : {}
>numOrBool : nothing
>numOrBool : never
}

2 changes: 1 addition & 1 deletion tests/baselines/reference/typeGuardsAsAssertions.types
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ function f4() {
>"boolean" : string

x; // nothing (boolean not in declared type)
>x : nothing
>x : never
}
x; // undefined
>x : undefined
Expand Down
4 changes: 2 additions & 2 deletions tests/baselines/reference/typeGuardsWithInstanceOf.errors.txt
Original file line number Diff line number Diff line change
@@ -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) ====
Expand All @@ -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'.
}