create-error.d.ts 238 B

1234567891011121314
  1. import {Constructor} from '../types.js';
  2. /**
  3. * Create error.
  4. *
  5. * @param errorCtor
  6. * @param message
  7. * @param args
  8. */
  9. export declare function createError<T>(
  10. errorCtor: Constructor<T>,
  11. message: string,
  12. ...args: unknown[]
  13. ): T;