swc/crates/swc_ecma_parser/tests/tsc/propertyAccessStringIndexSignatureNoImplicitAny.ts

13 lines
241 B
TypeScript
Raw Normal View History

// @noImplicitAny: true
interface Flags { [name: string]: boolean }
let flags: Flags;
flags.b;
flags.f;
flags.isNotNecessarilyNeverFalse;
flags['this is fine'];
interface Empty { }
let empty: Empty;
empty.nope;
empty["not allowed either"];