Function isTypeFlagSet

  • Test if the given node has the given TypeFlags set.

    Parameters

    • type: Type
    • flag: TypeFlags

    Returns boolean

    Example

    declare const type: ts.Type;

    if (isTypeFlagSet(type, ts.TypeFlags.Any)) {
    // ...
    }