TypeScript/tests/baselines/reference/restElementWithNullInitializer.errors.txt

24 lines
986 B
Plaintext
Raw Normal View History

2015-02-22 04:33:53 +01:00
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.
2015-02-21 21:41:20 +01:00
2015-02-22 04:33:53 +01:00
==== tests/cases/conformance/es6/destructuring/restElementWithNullInitializer.ts (3 errors) ====
function foo1([...r] = null) {
~~~~~~
2015-02-21 21:41:20 +01:00
!!! error TS2461: Type 'null' is not an array type.
2015-02-22 04:33:53 +01:00
}
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] = []) {
}
2015-02-21 21:41:20 +01:00