Function defineNode

  • A tool for simpler creating node classes.

    Type Parameters

    • T extends Record<string, Class<any>>

    Parameters

    • props: T

      string to Class record

    • name: string = ''

      returned class name

    Returns NodeClassWithProps<T>

    Example

    export const RenderNode = defineNode({
    position: Position,
    display: Display
    }, 'RenderNode');
    export type RenderNode = InstanceType<typeof RenderNode>;

    or

    Example

    export class RenderNode extends defineNode({
    position: Position,
    display: Display,
    }) {}

Generated using TypeDoc