Skip to main content

Parameters

string
required
The definition name. Must be an identifier. It appears in describe(), netlists, generated instance names and error messages.
readonly string[]
required
Input port names. Inferred as literal types. May be empty.
readonly string[]
required
Output port names. Inferred as literal types. Must not repeat any input name.
(inputs) => outputs
required
A pure, synchronous function. It receives a frozen object with the current value of every input, and must return an object with a Signal for every output and no other keys.

Returns

A frozen ComponentDefinition with kind: "primitive".

Example

Errors