mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-23 06:10:02 +08:00
- Preserve fields, accessors, added properties, and cyclic references across untyped class boundaries. - Support platform signal names and native exception handlers that resume queued work.
12 lines
308 B
JavaScript
12 lines
308 B
JavaScript
class Context {
|
|
id = 1;
|
|
}
|
|
function createCycle() {
|
|
const context = new Context();
|
|
const view = /** @type {unknown} */ (context);
|
|
view.self = view;
|
|
view.nested = { owner: view };
|
|
console.log(view.self === view, view.nested.owner === view, context.id);
|
|
}
|
|
for (let i = 0; i < 3; i++) createCycle();
|