TypeScript/tests/cases/compiler/indexerAsOptional.ts

9 lines
194 B
TypeScript
Raw Normal View History

2014-07-13 01:04:16 +02:00
interface indexSig {
//Index signatures can't be optional
[idx?: number]: any; //err
}
class indexSig2 {
//Index signatures can't be optional
[idx?: number]: any //err
}