TypeScript/tests/cases/compiler/unionTypeWithIndexedLiteralType.ts
2018-10-11 15:12:13 -07:00

4 lines
120 B
TypeScript

interface I { x: number; }
interface Idx { [index: string]: U; }
type U = Idx | I | "lit";
const u: U = { x: "lit" };