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

wire

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

Constructs a component OUTSIDE a tree — a script or a test that wants the class with its fields supplied by hand. The fields are assigned as the booter would inject them; nothing is checked, and create() is not called.

Declaration

export function wire<T extends object>(cls: new () => T, fields: Record<string, any>): T

Parameters & Return

cls

new () => T

fields

Record<string, any>

@returns

T