Represents the type guard object for a node type. For example, BaseNode.TypeGuard is a Node.TypeGuard.

interface TypeGuard<D, S> {
    isDataCompatible(data: BaseNode.Data): data is D;
    isScratchDataCompatible(sData: BaseNode.ScratchData): sData is S;
}

Type Parameters

Methods

  • Type guard for the data object of the node.

    Parameters

    Returns data is D

    Whether the data object is compatible with the node type.

  • Type guard for the scratch data object of the node.

    Parameters

    Returns sData is S

    Whether the scratch data object is compatible with the node type.