@prismshadow/penguin-core/kernel · Assembly & Boot

moduleDefOf

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

Turns a module class (and, recursively, its children) into the ModuleDef the booter runs. The string manifest is the generator's (table.modules[name] — it read the field annotations statically); the class is checked against it: every @Use field must be a requirement there with the same from, every @Provide field a provision, every child class a child. A mismatch means the table is stale, and says so. instances supplies pre-built instances for classes whose constructor takes arguments.

Declaration

export function moduleDefOf(cls: ModuleClass, opts: { manifests: ManifestTable; instances?: ReadonlyMap<ModuleClass, object>; extra?: ModuleDef[]; replace?: ReadonlyMap<string, ModuleDef>; }): ModuleDef

Parameters & Return

cls

ModuleClass

opts

{ manifests: ManifestTable; instances?: ReadonlyMap<ModuleClass, object>; extra?: ModuleDef[]; replace?: ReadonlyMap<string, ModuleDef>; }

@returns

ModuleDef

Type Cross-References

Static signature graph within @prismshadow/penguin-core/kernel
references1 kernel type