mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-02 08:35:07 +08:00
- Support published three.js rotations, bounds, ray intersections, culling, and vertex attributes on native and WASM targets without a JavaScript engine. - Preserve JavaScript class defaults, data descriptors, and captured loop bindings in static code. - Handle typed-array input unions and constructor identities while keeping unsupported method overrides explicit.
21 lines
830 B
JavaScript
21 lines
830 B
JavaScript
// @ts-nocheck
|
|
class Defaults { constructor(value = Defaults.value) { this.value = value; } }
|
|
class Child extends Defaults {}
|
|
const Alias = Defaults;
|
|
console.log(Defaults.value, Child.value, Defaults.hasOwnProperty('value'));
|
|
let effects = 0;
|
|
function initial() { effects++; return 'first'; }
|
|
Defaults.value = initial();
|
|
console.log(effects, new Defaults().value, Child.value, Child.hasOwnProperty('value'));
|
|
Alias.value = 'second';
|
|
console.log(Defaults.value, new Child().value);
|
|
Child.value = 'child';
|
|
Defaults.value = 'third';
|
|
console.log(Defaults.value, Child.value, Child.hasOwnProperty('value'));
|
|
Child.value = undefined;
|
|
console.log(Child.value, Defaults.value, Child.hasOwnProperty('value'));
|
|
Defaults.options = { scale: 2 };
|
|
console.log(Child.options.scale);
|
|
Child.options.scale = 3;
|
|
console.log(Defaults.options.scale);
|