mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Accept new baselines
This commit is contained in:
@@ -5,7 +5,7 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(23,25):
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(24,19): error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{ y: any; }'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(28,28): error TS2353: Object literal may only specify known properties, and 'y' does not exist in type '{ x: any; }'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(29,22): error TS2353: Object literal may only specify known properties, and 'x' does not exist in type '{ y: any; }'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(58,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string | 1', but here has type 'string'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(58,9): error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string | number', but here has type 'string'.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,10): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,13): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(62,16): error TS2525: Initializer provides no value for this binding element and the binding element has no default value.
|
||||
@@ -97,7 +97,7 @@ tests/cases/conformance/es6/destructuring/declarationsAndAssignments.ts(138,9):
|
||||
var x: number;
|
||||
var y: string;
|
||||
~
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string | 1', but here has type 'string'.
|
||||
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'y' must be of type 'string | number', but here has type 'string'.
|
||||
}
|
||||
|
||||
function f8() {
|
||||
|
||||
@@ -238,7 +238,7 @@ function f7() {
|
||||
var [x = 0, y = 1] = [1, "hello"]; // Error, initializer for y must be string
|
||||
>x : number
|
||||
>0 : 0
|
||||
>y : string | 1
|
||||
>y : string | number
|
||||
>1 : 1
|
||||
>[1, "hello"] : [number, string]
|
||||
>1 : 1
|
||||
@@ -248,7 +248,7 @@ function f7() {
|
||||
>x : number
|
||||
|
||||
var y: string;
|
||||
>y : string | 1
|
||||
>y : string | number
|
||||
}
|
||||
|
||||
function f8() {
|
||||
|
||||
@@ -39,7 +39,7 @@ function bar(): J {
|
||||
>3 : 3
|
||||
}
|
||||
var [b3 = "string", b4, b5] = bar(); // Error
|
||||
>b3 : Number | "string"
|
||||
>b3 : string | Number
|
||||
>"string" : "string"
|
||||
>b4 : Number
|
||||
>b5 : Number
|
||||
|
||||
@@ -62,9 +62,9 @@ var [b2 = 3, b3 = true, b4 = temp] = [3, false, { t1: false, t2: "hello" }];
|
||||
>"hello" : "hello"
|
||||
|
||||
var [b5 = 3, b6 = true, b7 = temp] = [undefined, undefined, undefined];
|
||||
>b5 : 3
|
||||
>b5 : number
|
||||
>3 : 3
|
||||
>b6 : true
|
||||
>b6 : boolean
|
||||
>true : true
|
||||
>b7 : { t1: boolean; t2: string; }
|
||||
>temp : { t1: boolean; t2: string; }
|
||||
|
||||
@@ -62,9 +62,9 @@ var [b2 = 3, b3 = true, b4 = temp] = [3, false, { t1: false, t2: "hello" }];
|
||||
>"hello" : "hello"
|
||||
|
||||
var [b5 = 3, b6 = true, b7 = temp] = [undefined, undefined, undefined];
|
||||
>b5 : 3
|
||||
>b5 : number
|
||||
>3 : 3
|
||||
>b6 : true
|
||||
>b6 : boolean
|
||||
>true : true
|
||||
>b7 : { t1: boolean; t2: string; }
|
||||
>temp : { t1: boolean; t2: string; }
|
||||
|
||||
@@ -62,9 +62,9 @@ var [b2 = 3, b3 = true, b4 = temp] = [3, false, { t1: false, t2: "hello" }];
|
||||
>"hello" : "hello"
|
||||
|
||||
var [b5 = 3, b6 = true, b7 = temp] = [undefined, undefined, undefined];
|
||||
>b5 : 3
|
||||
>b5 : number
|
||||
>3 : 3
|
||||
>b6 : true
|
||||
>b6 : boolean
|
||||
>true : true
|
||||
>b7 : { t1: boolean; t2: string; }
|
||||
>temp : { t1: boolean; t2: string; }
|
||||
|
||||
@@ -13,7 +13,7 @@ for (var {x: a = "", y: b = true} of array) {
|
||||
>a : string
|
||||
>"" : ""
|
||||
>y : any
|
||||
>b : number | true
|
||||
>b : number | boolean
|
||||
>true : true
|
||||
>array : { x: string; y: number; }[]
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ let { b = "foo" as "foo" } = { b: "bar" };
|
||||
>"bar" : "bar"
|
||||
|
||||
let { c = "foo" } = { c: "bar" as "bar" };
|
||||
>c : "foo" | "bar"
|
||||
>c : string
|
||||
>"foo" : "foo"
|
||||
>{ c: "bar" as "bar" } : { c?: "bar"; }
|
||||
>c : "bar"
|
||||
|
||||
Reference in New Issue
Block a user