mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 15:45:27 -05:00
Accept new baselines
This commit is contained in:
@@ -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
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -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)[]) { }
|
||||
|
||||
@@ -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][]
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user