Closed
Description
⚙ Compilation target
esnext
⚙ Library
esnext
Missing / Incorrect Definition
The SuppressedError
constructor inherits the ErrorConstructor
:
interface SuppressedErrorConstructor extends ErrorConstructor {
new (error: any, suppressed: any, message?: string): SuppressedError;
(error: any, suppressed: any, message?: string): SuppressedError;
readonly prototype: SuppressedError;
}
declare var SuppressedError: SuppressedErrorConstructor;
however this spuriously adds overload signatures from ErrorConstructor
which should not be allowed for SuppressedError
.
Sample Code
This overload inherited from ErrorConstructor
should not be allowed for SuppressedError
:
const supressedError = new SuppressedError(`This should not be an allowed signature`)
Documentation Link
The spec for SuppressedError
is here.