Accept new baselines

This commit is contained in:
Anders Hejlsberg
2018-06-11 06:13:24 -07:00
parent c69e4e7aff
commit 73e008d146
4 changed files with 5 additions and 8 deletions

View File

@@ -1,4 +1,3 @@
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(11,13): error TS2370: A rest parameter must be of an array type.
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(13,13): error TS2370: A rest parameter must be of an array type.
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(14,17): error TS1047: A rest parameter cannot be optional.
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(15,16): error TS1048: A rest parameter cannot have an initializer.
@@ -17,7 +16,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(
tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(34,28): error TS2304: Cannot find name 'E'.
==== tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts (12 errors) ====
==== tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts (11 errors) ====
// If the parameter is a rest parameter, the parameter type is any[]
// A type annotation for a rest parameter must denote an array type.
@@ -29,8 +28,6 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(
type stringOrNumArray = Array<String|Number>;
function a0(...x: [number, number, string]) { } // Error, rest parameter must be array type
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS2370: A rest parameter must be of an array type.
function a1(...x: (number|string)[]) { }
function a2(...a: someArray) { } // Error, rest parameter must be array type
~~~~~~~~~~~~~~~

View File

@@ -22,7 +22,7 @@ type stringOrNumArray = Array<String|Number>;
>Number : Number
function a0(...x: [number, number, string]) { } // Error, rest parameter must be array type
>a0 : (...x: [number, number, string]) => void
>a0 : (x_0: number, x_1: number, x_2: string) => void
>x : [number, number, string]
function a1(...x: (number|string)[]) { }

View File

@@ -1,6 +1,6 @@
=== tests/cases/conformance/es6/destructuring/iterableArrayPattern25.ts ===
function takeFirstTwoEntries(...[[k1, v1], [k2, v2]]) { }
>takeFirstTwoEntries : (...[[k1, v1], [k2, v2]]: [[any, any], [any, any]]) => void
>takeFirstTwoEntries : (__0_0: [any, any], __0_1: [any, any]) => void
>k1 : any
>v1 : any
>k2 : any
@@ -8,7 +8,7 @@ function takeFirstTwoEntries(...[[k1, v1], [k2, v2]]) { }
takeFirstTwoEntries(new Map([["", 0], ["hello", 1]]));
>takeFirstTwoEntries(new Map([["", 0], ["hello", 1]])) : void
>takeFirstTwoEntries : (...[[k1, v1], [k2, v2]]: [[any, any], [any, any]]) => void
>takeFirstTwoEntries : (__0_0: [any, any], __0_1: [any, any]) => void
>new Map([["", 0], ["hello", 1]]) : Map<string, number>
>Map : MapConstructor
>[["", 0], ["hello", 1]] : [string, number][]

View File

@@ -1,6 +1,6 @@
=== tests/cases/compiler/restParameterWithBindingPattern2.ts ===
function a(...[a, b]) { }
>a : (...[a, b]: [any, any]) => void
>a : (__0_0: any, __0_1: any) => void
>a : any
>b : any