mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-04 08:04:37 +08:00
Node islands stack, part 3 of 11 (scriptc-perf/results/islands-prs/PLAN.md). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
14 lines
417 B
TypeScript
14 lines
417 B
TypeScript
// A native class extending a class owned by a Node island is SC8011:
|
|
// native subclasses of island classes are not supported yet (NI-5b).
|
|
import { requireModule } from "@scriptc/node";
|
|
|
|
interface Lib {
|
|
Point: new (x: number, y: number) => { x: number; y: number; norm(): number };
|
|
}
|
|
const { Point } = requireModule<Lib>("./lib.cjs");
|
|
|
|
class Point3 extends Point {
|
|
z = 0;
|
|
}
|
|
console.log(new Point3(1, 2).norm());
|