Bump deps (& remove unused overrides) (#5549)

This commit is contained in:
Jaco
2023-03-18 11:59:42 +02:00
committed by GitHub
parent ac8446b30c
commit cf1fabaecf
53 changed files with 138 additions and 170 deletions
+2 -4
View File
@@ -197,8 +197,7 @@ export abstract class AbstractInt extends BN implements INumber {
/**
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public toHuman (isExpanded?: boolean): string {
public toHuman (_isExpanded?: boolean): string {
const rawType = this.toRawType();
if (rawType === 'Balance') {
@@ -263,8 +262,7 @@ export abstract class AbstractInt extends BN implements INumber {
* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public toU8a (isBare?: boolean): Uint8Array {
public toU8a (_isBare?: boolean): Uint8Array {
return bnToU8a(this, {
bitLength: this.bitLength(),
isLe: true,
+1 -2
View File
@@ -195,8 +195,7 @@ export class Compact<T extends INumber> implements ICompact<T> {
* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public toU8a (isBare?: boolean): Uint8Array {
public toU8a (_isBare?: boolean): Uint8Array {
return compactToU8a(this.#raw.toBn());
}
+1 -2
View File
@@ -91,8 +91,7 @@ export class Null implements Codec {
* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public toU8a (isBare?: boolean): Uint8Array {
public toU8a (_isBare?: boolean): Uint8Array {
return new Uint8Array();
}
}
+1 -1
View File
@@ -131,7 +131,7 @@ describe('Vec', (): void => {
it('exposes a working filter', (): void => {
expect(
vector.filter((e, i): boolean => i >= 3).toString()
vector.filter((_, i): boolean => i >= 3).toString()
).toEqual('4567,56789');
});
+5 -5
View File
@@ -118,14 +118,14 @@ export class Vec<T extends Codec> extends AbstractArray<T> {
/**
* @description Finds the index of the value in the array
*/
public override indexOf (_other?: unknown): number {
public override indexOf (other?: unknown): number {
// convert type first, this removes overhead from the eq
const other = _other instanceof this.#Type
? _other
: new this.#Type(this.registry, _other);
const check = other instanceof this.#Type
? other
: new this.#Type(this.registry, other);
for (let i = 0; i < this.length; i++) {
if (other.eq(this[i])) {
if (check.eq(this[i])) {
return i;
}
}
+1 -2
View File
@@ -132,8 +132,7 @@ export class bool extends Boolean implements Codec {
* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public toU8a (isBare?: boolean): Uint8Array {
public toU8a (_isBare?: boolean): Uint8Array {
return new Uint8Array([this.valueOf() ? 1 : 0]);
}
}
+1 -2
View File
@@ -164,8 +164,7 @@ export class CodecDate extends Date implements INumber {
* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public toU8a (isBare?: boolean): Uint8Array {
public toU8a (_isBare?: boolean): Uint8Array {
return bnToU8a(this.toNumber(), U8A_OPTS);
}
}
+1 -2
View File
@@ -141,8 +141,7 @@ export class Json extends Map<string, any> implements Codec {
/**
* @description Unimplemented, will throw
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public toU8a (isBare?: boolean): Uint8Array {
public toU8a (_isBare?: boolean): Uint8Array {
throw new Error('Unimplemented');
}
}
+1 -2
View File
@@ -155,8 +155,7 @@ export class Raw extends Uint8Array implements IU8a {
* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public toU8a (isBare?: boolean): Uint8Array {
public toU8a (_isBare?: boolean): Uint8Array {
return Uint8Array.from(this);
}
+1 -2
View File
@@ -259,8 +259,7 @@ export class CodecSet extends Set<string> implements ISet<string> {
* @description Encodes the value as a Uint8Array as per the SCALE specifications
* @param isBare true when the value has none of the type-specific prefixes (internal)
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
public toU8a (isBare?: boolean): Uint8Array {
public toU8a (_isBare?: boolean): Uint8Array {
return bnToU8a(this.valueEncoded, {
bitLength: this.#byteLength * 8,
isLe: true
+1 -1
View File
@@ -75,7 +75,7 @@ function decodeStructFromObject (registry: Registry, [Types, keys]: Definition,
try {
type = new Type(registry).toRawType();
} catch (error) {
} catch {
// ignore
}
+1 -1
View File
@@ -6,7 +6,7 @@ import type { Codec, CodecClass, Registry } from '../types/index.js';
import { u8aToHex } from '@polkadot/util';
/** @internal */
function formatFailure (registry: Registry, fn: 'decodeU8a' | 'decodeU8aStruct' | 'decodeU8aVec', result: unknown[], { message }: Error, u8a: Uint8Array, i: number, count: number, Type: CodecClass, key?: string): string {
function formatFailure (registry: Registry, fn: 'decodeU8a' | 'decodeU8aStruct' | 'decodeU8aVec', _result: unknown[], { message }: Error, u8a: Uint8Array, i: number, count: number, Type: CodecClass, key?: string): string {
let type = '';
try {