mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-21 05:50:55 +08:00
* Expand static three.js workflows and host integration * Preserve JavaScript class state in static three.js workflows * Preserve inferred JavaScript behavior across static workflows * Preserve inferred callables and native compatibility boundaries * Retain annotated JavaScript factory exports and bootstrap-safe call spreads * Preserve Buffer and child callback identities in static packages * Clarify JavaScript symbol spread support
12 lines
446 B
JavaScript
12 lines
446 B
JavaScript
function node(value) { return { value, next: null }; }
|
|
function identity(value) { return value; }
|
|
const first = node(1), second = node(2);
|
|
first.next = second;
|
|
console.log(identity(first.next).value);
|
|
second.next = first;
|
|
console.log(identity(first.next.next) === first);
|
|
const scratch = { center: null, elements: [] };
|
|
scratch.center = { x: 3 };
|
|
scratch.elements = [4, 5];
|
|
console.log(identity(scratch.center).x, identity(scratch.elements)[1]);
|