mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-19 05:29:46 +08:00
- Keep generic bindings and short-circuit writes scoped to their native execution context. - Compile Map and Set copies, tuple callbacks and searches, and string-pattern replacement. - Exercise production frontend registries without Node and preserve mutation, identity, and evaluation order.
14 lines
682 B
TypeScript
14 lines
682 B
TypeScript
// The island-backed ambient surface (number methods and Number statics)
|
|
// typechecks against real static types but executes in the embedded
|
|
// engine: in a static build every use site is its own SC2012 naming the
|
|
// flag — never an ICE, never a link error. Static Math methods include
|
|
// the scalar functions and variadic Math.hypot. The .split(string),
|
|
// trim/pad variants, parseInt, isNaN, and the global parseFloat/isFinite
|
|
// over exactly-typed arguments and string-pattern replacement compile statically now and no longer
|
|
// appear here.)
|
|
const up = Math.cbrt(2);
|
|
const tau = Math.PI * 2;
|
|
const price = (19.99).toPrecision(4);
|
|
const n = Number.parseFloat("3.14");
|
|
void n;
|