Function isUnionOrIntersectionTypeNode

  • Test if a node is an UnionOrIntersectionTypeNode.

    Parameters

    • node: Node

    Returns node is UnionOrIntersectionTypeNode

    Whether the given node appears to be an UnionOrIntersectionTypeNode.

    Example

    declare const node: ts.Node;

    if (isUnionOrIntersectionTypeNode(node)) {
    // ...
    }