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

18 lines
724 B
Plaintext
Raw Normal View History

tests/cases/compiler/indexerAsOptional.ts(3,9): error TS1019: An index signature parameter cannot have a question mark.
tests/cases/compiler/indexerAsOptional.ts(8,9): error TS1019: An index signature parameter cannot have a question mark.
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
~
!!! error TS1019: An index signature parameter cannot have a question mark.
2014-07-13 01:04:16 +02:00
}
class indexSig2 {
//Index signatures can't be optional
[idx?: number]: any //err
~
!!! error TS1019: An index signature parameter cannot have a question mark.
2014-07-13 01:04:16 +02:00
}