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

12 lines
209 B
TypeScript

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["that's ok"];