toError.d.ts 175 B

1234
  1. /**
  2. * Sometimes a non-error is thrown, wrap it as an Error instance to ensure a consistent Error interface.
  3. */
  4. export declare function toError(thrownValue: unknown): Error;