mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-20 05:40:17 +08:00
10 lines
305 B
TypeScript
10 lines
305 B
TypeScript
const n: number = 3;
|
|
const t = n > 0 ? "pos" : "neg";
|
|
const o = { ...{ a: 1 } };
|
|
const b = "a" in { a: 1 };
|
|
const m = typeof "ab".indexOf("b"); // a CALL operand — pure computations fold now
|
|
const u = n === 3 ? 1 : 2;
|
|
const s: string = "abc";
|
|
const mixed = n === 3 && s;
|
|
console.log(t, m, u, b, mixed);
|