devtypes - v2.0.0
    Preparing search index...

    Type Alias AssertRegExp<T>

    AssertRegExp: T

    Assert that a type is a RegExp.

    Type Parameters

    • T extends RegExp

      Type that must be a RegExp

    Ensures the type extends the built-in RegExp object.

    type A = AssertRegExp< RegExp >;  // ✓
    type B = AssertRegExp< string >; // ✗ TS error