@prismshadow/penguin-core/kernel · Low-level Kernel & Upgrade

moduleDefiner

function low-level
Source ↗
IMPORT import { moduleDefiner } from "@prismshadow/penguin-core/kernel";

A defineModule bound to an interface registry. A module is its manifest as a literal (the static half — the generator extracts it without executing the file) and its create; use and api are typed FROM the manifest through the registry, so the two cannot drift: an alias renamed in requires is a type error at every ctx.use.<alias>, and an interface named in provides is what api must satisfy. A key the registry does not carry types as unknown (a plugin requiring a host interface it has no types for still boots; the host checks the signature).

Declaration

export function moduleDefiner<Reg extends IfaceRegistry>()