Fix compilation after upgrading TypeScript
This commit is contained in:
parent
c93ad3eb0d
commit
c2219527b8
|
|
@ -14,8 +14,12 @@ export function panicProxy<T extends object>(module: T): T {
|
||||||
if (isClass) {
|
if (isClass) {
|
||||||
// eslint-disable-next-line func-names
|
// eslint-disable-next-line func-names
|
||||||
return function (...args: unknown[]): unknown {
|
return function (...args: unknown[]): unknown {
|
||||||
|
// All three of these comment lines are necessary to suppress errors at both compile time and while editing this file (@ts-expect-error doesn't work here while editing the file)
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore
|
||||||
// eslint-disable-next-line new-cap
|
// eslint-disable-next-line new-cap
|
||||||
const result = new targetValue(...args);
|
const result = new targetValue(...args);
|
||||||
|
|
||||||
return panicProxy(result);
|
return panicProxy(result);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue