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

14 lines
448 B
Text
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/indexerAsOptional.ts (2 errors) ====
interface indexSig {
//Index signatures can't be optional
[idx?: number]: any; //err
~~~
!!! An index signature parameter cannot have a question mark.
}
class indexSig2 {
//Index signatures can't be optional
[idx?: number]: any //err
~~~
!!! An index signature parameter cannot have a question mark.
}