TypeScript/tests/cases/compiler/noImplicitAnyStringIndexerOnObject.ts

4 lines
83 B
TypeScript

// @noimplicitany: true
var x = {}["hello"];
var y: string = { '': 'foo' }[''];