18 lines
No EOL
724 B
Text
18 lines
No EOL
724 B
Text
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.
|
|
|
|
|
|
==== 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.
|
|
}
|
|
|
|
class indexSig2 {
|
|
//Index signatures can't be optional
|
|
[idx?: number]: any //err
|
|
~
|
|
!!! error TS1019: An index signature parameter cannot have a question mark.
|
|
} |