TypeScript/tests/cases/compiler/unionTypeWithIndexedLiteralType.ts

4 lines
120 B
TypeScript
Raw Normal View History

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