Minor x-bundle style cleanups (#1074)

This commit is contained in:
Jaco
2021-08-10 11:15:10 +02:00
committed by GitHub
parent 8221576d25
commit 7a5b1207b0
8 changed files with 275 additions and 278 deletions
+1 -3
View File
@@ -1,6 +1,4 @@
// Copyright 2017-2021 @polkadot/x-bundle authors & contributors
// SPDX-License-Identifier: Apache-2.0
const crypto = {};
export default crypto;
export default {};
+1 -3
View File
@@ -1,6 +1,4 @@
// Copyright 2017-2021 @polkadot/x-bundle authors & contributors
// SPDX-License-Identifier: Apache-2.0
const empty = {};
export default empty;
export default {};
+2 -8
View File
@@ -5,22 +5,16 @@
// The ISC License
// Copyright (c) Isaac Z. Schlueter
// eslint-disable-next-line @typescript-eslint/no-explicit-any,@typescript-eslint/explicit-module-boundary-types
function inherits (ctor: any, superCtor: any): any {
export default function inherits (ctor: Record<string, unknown>, superCtor: Record<string, unknown>): void {
if (superCtor) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access
ctor.super_ = superCtor;
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment,@typescript-eslint/no-unsafe-member-access
ctor.prototype = Object.create(superCtor.prototype, {
ctor.prototype = Object.create(superCtor.prototype as null, {
constructor: {
configurable: true,
enumerable: false,
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
value: ctor,
writable: true
}
});
}
}
export default inherits;