TypeScript/tests/baselines/reference/restElementWithNullInitializer.errors.txt
2015-02-21 19:33:53 -08:00

24 lines
986 B
Plaintext

tests/cases/conformance/es6/destructuring/restElementWithNullInitializer.ts(1,15): error TS2461: Type 'null' is not an array type.
tests/cases/conformance/es6/destructuring/restElementWithNullInitializer.ts(4,15): error TS2461: Type 'undefined' is not an array type.
tests/cases/conformance/es6/destructuring/restElementWithNullInitializer.ts(7,15): error TS2461: Type '{ [x: number]: undefined; }' is not an array type.
==== tests/cases/conformance/es6/destructuring/restElementWithNullInitializer.ts (3 errors) ====
function foo1([...r] = null) {
~~~~~~
!!! error TS2461: Type 'null' is not an array type.
}
function foo2([...r] = undefined) {
~~~~~~
!!! error TS2461: Type 'undefined' is not an array type.
}
function foo3([...r] = {}) {
~~~~~~
!!! error TS2461: Type '{ [x: number]: undefined; }' is not an array type.
}
function foo4([...r] = []) {
}