SPeCS Packages Documentation
    Preparing search index...

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

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

    Type Parameters

    Index

    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.