Function matchesTemplate

  • Checks if a string matches a given template, narrowing the type of the string accordingly.

    Type Parameters

    Parameters

    • str: string

      String to check.

    • template: T

      Template to match against.

    Returns str is MatchesTemplate<T>

    True if the string matches the template, false otherwise.

Generated using TypeDoc