devtypes - v2.0.0
    Preparing search index...

    Type Alias AssertError<T>

    AssertError: T

    Assert that a type is an Error.

    Type Parameters

    • T extends Error

      Type that must extend Error

    Accepts all error subclasses such as TypeError or RangeError.

    type A = AssertError< Error >;      // ✓
    type B = AssertError< TypeError >; // ✓
    type C = AssertError< string >; // ✗ TS error