TypeScript-TmLanguage/tests/cases/constType.ts

4 строки
142 B
TypeScript

let r2 = { x: 20, y: 10 } as const;
let r2 = {...p} as const;
let p1 = { x: 10, y: 20 as const };
let p2 = { 10 as const, 'foo' as const };