mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-24 06:14:01 +08:00
15 lines
567 B
TypeScript
15 lines
567 B
TypeScript
// Chained getter/setter calls typed by the package's own .d.ts overloads.
|
|
// --npm-static projects the safe overload groups onto the matching runtime
|
|
// JavaScript class, preserving the authored call surface while compiling
|
|
// and validating the actual implementation body.
|
|
import { Chainy } from "chainy";
|
|
|
|
const c = new Chainy();
|
|
c.name("emulate").tag("cli");
|
|
console.log(c.render());
|
|
console.log(c.name());
|
|
console.log(c.readOwnName());
|
|
console.log(c.findOwnName(["other", "emulate"]));
|
|
console.log(c.findOwnName([""]));
|
|
console.log(c.ancestorNames().join(","));
|