mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-21 05:50:55 +08:00
11 lines
647 B
TypeScript
11 lines
647 B
TypeScript
// The honest static subset of `any` compiles now — bindings, params,
|
|
// returns, assignments, reads ride the checked-dynamic tree — so what this
|
|
// fixture pins is the RESIDUE: operations only the engine's full JS
|
|
// semantics can run. Each site reports the choice: opt into the embedded
|
|
// engine, or stay static with 'unknown' + a checked cast.
|
|
const n: any = 41;
|
|
const sum = n + 1; // ToNumber/ToPrimitive coercion — engine only
|
|
var { x } = <any>0; // destructuring a non-object 'any' — engine only
|
|
for (const v of n as any) console.log(v); // native checked iteration reports non-iterables at runtime
|
|
export const marker: number = 1;
|