Type Alias ExceptionConstructorArgs<TParams, TOptions>

ExceptionConstructorArgs: IsNever<RequiredKeysOf<TOptions>> extends true
    ? [message?: string, options?: TOptions]
    : TParams extends { message: (details: any) => string
    | string }
        ? [TOptions]
        : [message: string, options: TOptions]

Type Parameters