-
Notifications
You must be signed in to change notification settings - Fork 0
registry
hhh edited this page Jan 28, 2023
·
1 revision
/**
* Type of node constructors.
*/
type NodeConstructor<OptionType = any> = new (options?: OptionType) => CanvasNode<any>;
/**
* Extract type of parameters of the given node constructor.
*/
type NodeConstructorParameters<Constructor extends NodeConstructor> = Constructor extends NodeConstructor<infer T> ? T : never;
/**
* The registry of canvas node constructors.
* (tag -> constructor)
*/
const registry: Map<string, NodeConstructor<any>>;