@@ -19,7 +19,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@babel/runtime": "^7.14.6",
|
||||
"@polkadot/api": "4.15.2-2",
|
||||
"@polkadot/types": "4.15.2-2",
|
||||
"@polkadot/util": "^6.9.1",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@babel/runtime": "^7.14.6",
|
||||
"@polkadot/api": "4.15.2-2",
|
||||
"@polkadot/rpc-core": "4.15.2-2",
|
||||
"@polkadot/types": "4.15.2-2",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@babel/runtime": "^7.14.6",
|
||||
"@polkadot/api-derive": "4.15.2-2",
|
||||
"@polkadot/keyring": "^6.9.1",
|
||||
"@polkadot/metadata": "4.15.2-2",
|
||||
|
||||
@@ -82,13 +82,6 @@ export abstract class Getters<ApiType extends ApiTypes> extends Init<ApiType> {
|
||||
return assertResult(this._genesisHash);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description `true` when subscriptions are supported
|
||||
*/
|
||||
public get hasSubscriptions (): boolean {
|
||||
return this._rpcCore.provider.hasSubscriptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description true is the underlying provider is connected
|
||||
*/
|
||||
|
||||
@@ -91,7 +91,7 @@ describe('ApiPromise', (): void => {
|
||||
super({ provider });
|
||||
}
|
||||
|
||||
protected _loadMeta (): Promise<boolean> {
|
||||
protected override _loadMeta (): Promise<boolean> {
|
||||
throw new Error('Simulate failure to load meta');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
|
||||
* @description Sign a transaction, returning the this to allow chaining, i.e. .sign(...).send(). When options, e.g. nonce/blockHash are not specified, it will be inferred. To retrieve eg. nonce use `signAsync` (the preferred interface, this is provided for backwards compatibility)
|
||||
* @deprecated
|
||||
*/
|
||||
public sign (account: IKeyringPair, optionsOrNonce?: Partial<SignerOptions>): this {
|
||||
public override sign (account: IKeyringPair, optionsOrNonce?: Partial<SignerOptions>): this {
|
||||
super.sign(account, this.#makeSignOptions(this.#optionsOrNonce(optionsOrNonce), {}));
|
||||
|
||||
return this;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@babel/runtime": "^7.14.6",
|
||||
"@polkadot/types": "4.15.2-2",
|
||||
"@polkadot/types-known": "4.15.2-2",
|
||||
"@polkadot/util": "^6.9.1",
|
||||
|
||||
@@ -142,7 +142,7 @@ export class MetadataVersioned extends Struct {
|
||||
/**
|
||||
* @description Converts the Object to JSON, typically used for RPC transfers
|
||||
*/
|
||||
public toJSON (): Record<string, AnyJson> {
|
||||
public override toJSON (): Record<string, AnyJson> {
|
||||
// HACK(y): ensure that we apply the aliases if we have not done so already, this is
|
||||
// needed to ensure we have the correct overrides (which is only applied in toLatest)
|
||||
// eslint-disable-next-line no-unused-expressions
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@babel/runtime": "^7.14.6",
|
||||
"@polkadot/metadata": "4.15.2-2",
|
||||
"@polkadot/rpc-provider": "4.15.2-2",
|
||||
"@polkadot/types": "4.15.2-2",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@babel/runtime": "^7.14.6",
|
||||
"@polkadot/types": "4.15.2-2",
|
||||
"@polkadot/util": "^6.9.1",
|
||||
"@polkadot/util-crypto": "^6.9.1",
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/typegen#readme",
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.14.5",
|
||||
"@babel/core": "^7.14.6",
|
||||
"@babel/register": "^7.14.5",
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@babel/runtime": "^7.14.6",
|
||||
"@polkadot/api": "4.15.2-2",
|
||||
"@polkadot/metadata": "4.15.2-2",
|
||||
"@polkadot/rpc-provider": "4.15.2-2",
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@babel/runtime": "^7.14.6",
|
||||
"@polkadot/networks": "^6.9.1",
|
||||
"@polkadot/types": "4.15.2-2",
|
||||
"@polkadot/util": "^6.9.1"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
"bugs": "https://github.com/polkadot-js/api/issues",
|
||||
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.14.5",
|
||||
"@babel/runtime": "^7.14.6",
|
||||
"@polkadot/metadata": "4.15.2-2",
|
||||
"@polkadot/util": "^6.9.1",
|
||||
"@polkadot/util-crypto": "^6.9.1",
|
||||
|
||||
@@ -50,7 +50,7 @@ export abstract class AbstractArray<T extends Codec> extends Array<T> implements
|
||||
/**
|
||||
* @description The length of the value
|
||||
*/
|
||||
public get length (): number {
|
||||
public override get length (): number {
|
||||
// only included here since we ignore inherited docs
|
||||
return super.length;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ export abstract class AbstractArray<T extends Codec> extends Array<T> implements
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
// Overwrite the default toString representation of Array.
|
||||
const data = this.map((entry): string =>
|
||||
entry.toString()
|
||||
@@ -135,35 +135,35 @@ export abstract class AbstractArray<T extends Codec> extends Array<T> implements
|
||||
/**
|
||||
* @description Concatenates two arrays
|
||||
*/
|
||||
public concat (other: T[]): T[] {
|
||||
public override concat (other: T[]): T[] {
|
||||
return this.toArray().concat(other instanceof AbstractArray ? other.toArray() : other);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Filters the array with the callback
|
||||
*/
|
||||
public filter (callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: unknown): T[] {
|
||||
public override filter (callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: unknown): T[] {
|
||||
return this.toArray().filter(callbackfn, thisArg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Maps the array with the callback
|
||||
*/
|
||||
public map<U> (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: unknown): U[] {
|
||||
public override map<U> (callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: unknown): U[] {
|
||||
return this.toArray().map(callbackfn, thisArg);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Checks if the array includes a specific value
|
||||
*/
|
||||
public includes (check: unknown): boolean {
|
||||
public override includes (check: unknown): boolean {
|
||||
return this.some((value: T) => value.eq(check));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns a slice of an array
|
||||
*/
|
||||
public slice (start?: number, end?: number): T[] {
|
||||
public override slice (start?: number, end?: number): T[] {
|
||||
return this.toArray().slice(start, end);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ export abstract class AbstractInt extends BN implements Codec {
|
||||
/**
|
||||
* @description Returns the number of bits in the value
|
||||
*/
|
||||
public bitLength (): number {
|
||||
public override bitLength (): number {
|
||||
return this.#bitLength;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ export abstract class AbstractInt extends BN implements Codec {
|
||||
* @description Compares the value of the input to see if there is a match
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
public eq (other?: unknown): boolean {
|
||||
public override eq (other?: unknown): boolean {
|
||||
// Here we are actually overriding the built-in .eq to take care of both
|
||||
// number and BN inputs (no `.eqn` needed) - numbers will be converted
|
||||
return super.eq(
|
||||
@@ -192,7 +192,7 @@ export abstract class AbstractInt extends BN implements Codec {
|
||||
/**
|
||||
* @description Converts the Object to JSON, typically used for RPC transfers
|
||||
*/
|
||||
public toJSON (onlyHex = false): any {
|
||||
public override toJSON (onlyHex = false): any {
|
||||
// FIXME this return type should by string | number, however BN returns string
|
||||
// Options here are
|
||||
// - super.bitLength() - the actual used bits
|
||||
@@ -218,7 +218,7 @@ export abstract class AbstractInt extends BN implements Codec {
|
||||
* @description Returns the string representation of the value
|
||||
* @param base The base to use for the conversion
|
||||
*/
|
||||
public toString (base?: number): string {
|
||||
public override toString (base?: number): string {
|
||||
// only included here since we do not inherit docs
|
||||
return super.toString(base);
|
||||
}
|
||||
|
||||
@@ -175,7 +175,7 @@ export class BTreeSet<V extends Codec = Codec> extends Set<V> implements Codec {
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
return stringify(this.toJSON());
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ export class CodecDate extends Date implements Codec {
|
||||
/**
|
||||
* @description Converts the Object to JSON, typically used for RPC transfers
|
||||
*/
|
||||
public toJSON (): any {
|
||||
public override toJSON (): any {
|
||||
// FIXME Return type should be number, but conflicts with Date.toJSON()
|
||||
// which returns string
|
||||
return this.toNumber();
|
||||
@@ -137,7 +137,7 @@ export class CodecDate extends Date implements Codec {
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
// only included here since we do not inherit docs
|
||||
return super.toString();
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ export class Int extends AbstractInt {
|
||||
super(registry, value, bitLength);
|
||||
}
|
||||
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return typeName || super.toRawType();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -111,7 +111,7 @@ export class Json extends Map<string, any> implements Codec {
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
return stringify(this.toJSON());
|
||||
}
|
||||
|
||||
|
||||
@@ -44,14 +44,14 @@ export class Linkage<T extends Codec> extends Struct {
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return `Linkage<${this.next.toRawType(true)}>`;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Custom toU8a which with bare mode does not return the linkage if empty
|
||||
*/
|
||||
public toU8a (): Uint8Array {
|
||||
public override toU8a (): Uint8Array {
|
||||
// As part of a storage query (where these appear), in the case of empty, the values
|
||||
// are NOT populated by the node - follow the same logic, leaving it empty
|
||||
return this.isEmpty
|
||||
|
||||
@@ -182,7 +182,7 @@ export class CodecMap<K extends Codec = Codec, V extends Codec = Codec> extends
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
return stringify(this.toJSON());
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ export class Raw extends Uint8Array implements IU8a {
|
||||
/**
|
||||
* @description The length of the value
|
||||
*/
|
||||
public get length (): number {
|
||||
public override get length (): number {
|
||||
// only included here since we ignore inherited docs
|
||||
return super.length;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ export class Raw extends Uint8Array implements IU8a {
|
||||
* @param start The position to start at
|
||||
* @param end The position to end at
|
||||
*/
|
||||
public slice (start?: number, end?: number): Uint8Array {
|
||||
public override slice (start?: number, end?: number): Uint8Array {
|
||||
// Like subarray below, we have to follow this approach since we are extending the TypeArray.
|
||||
// This happens especially when it comes to further extensions, the length may be an override
|
||||
return Uint8Array.from(this).slice(start, end);
|
||||
@@ -104,7 +104,7 @@ export class Raw extends Uint8Array implements IU8a {
|
||||
* @param begin The position to start at
|
||||
* @param end The position to end at
|
||||
*/
|
||||
public subarray (begin?: number, end?: number): Uint8Array {
|
||||
public override subarray (begin?: number, end?: number): Uint8Array {
|
||||
return Uint8Array.from(this).subarray(begin, end);
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ export class Raw extends Uint8Array implements IU8a {
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
return this.toHex();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ export class Result<O extends Codec, E extends Codec> extends Enum {
|
||||
super(registry, { Ok, Err }, value);
|
||||
}
|
||||
|
||||
public static with<O extends Codec, E extends Codec> (Types: { Ok: Constructor<O> | keyof InterfaceTypes; Err: Constructor<E> | keyof InterfaceTypes }): Constructor<Result<O, E>> {
|
||||
public static override with<O extends Codec, E extends Codec> (Types: { Ok: Constructor<O> | keyof InterfaceTypes; Err: Constructor<E> | keyof InterfaceTypes }): Constructor<Result<O, E>> {
|
||||
return class extends Result<O, E> {
|
||||
constructor (registry: Registry, value?: unknown) {
|
||||
super(registry, Types.Ok, Types.Err, value);
|
||||
@@ -55,7 +55,7 @@ export class Result<O extends Codec, E extends Codec> extends Enum {
|
||||
/**
|
||||
* @description Checks if the Result has no value
|
||||
*/
|
||||
public get isEmpty (): boolean {
|
||||
public override get isEmpty (): boolean {
|
||||
return this.isOk && this.value.isEmpty;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ export class Result<O extends Codec, E extends Codec> extends Enum {
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
const Types = this._toRawStruct() as { Ok: unknown; Err: unknown };
|
||||
|
||||
return `Result<${Types.Ok as string},${Types.Err as string}>`;
|
||||
|
||||
@@ -149,7 +149,7 @@ export class CodecSet extends Set<string> implements Codec {
|
||||
/**
|
||||
* @description adds a value to the Set (extended to allow for validity checking)
|
||||
*/
|
||||
public add = (key: string): this => {
|
||||
public override add = (key: string): this => {
|
||||
// ^^^ add = () property done to assign this instance's this, otherwise Set.add creates "some" chaos
|
||||
// we have the isUndefined(this._setValues) in here as well, add is used internally
|
||||
// in the Set constructor (so it is undefined at this point, and should allow)
|
||||
@@ -214,7 +214,7 @@ export class CodecSet extends Set<string> implements Codec {
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
return `[${this.strings.join(', ')}]`;
|
||||
}
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ export class Struct<
|
||||
* @description Returns a specific names entry in the structure
|
||||
* @param name The name of the entry to retrieve
|
||||
*/
|
||||
public get (name: keyof S): Codec | undefined {
|
||||
public override get (name: keyof S): Codec | undefined {
|
||||
return super.get(name);
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ export class Struct<
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
return stringify(this.toJSON());
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ export class Tuple extends AbstractArray<Codec> {
|
||||
/**
|
||||
* @description The length of the value when encoded as a Uint8Array
|
||||
*/
|
||||
public get encodedLength (): number {
|
||||
public override get encodedLength (): number {
|
||||
return this.reduce((total, entry) => total + entry.encodedLength, 0);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ export class Tuple extends AbstractArray<Codec> {
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
// Overwrite the default toString representation of Array.
|
||||
return stringify(this.toJSON());
|
||||
}
|
||||
@@ -113,7 +113,7 @@ export class Tuple extends AbstractArray<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)
|
||||
*/
|
||||
public toU8a (isBare?: boolean): Uint8Array {
|
||||
public override toU8a (isBare?: boolean): Uint8Array {
|
||||
return u8aConcat(
|
||||
...this.map((entry): Uint8Array =>
|
||||
entry.toU8a(isBare)
|
||||
|
||||
@@ -43,7 +43,7 @@ export class U8aFixed extends Raw {
|
||||
super(registry, value, bitLength);
|
||||
}
|
||||
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return typeName || super.toRawType();
|
||||
}
|
||||
};
|
||||
@@ -52,7 +52,7 @@ export class U8aFixed extends Raw {
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return `[u8;${this.length}]`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export class UInt extends AbstractInt {
|
||||
super(registry, value, bitLength);
|
||||
}
|
||||
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return typeName || super.toRawType();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -73,7 +73,7 @@ export class Vec<T extends Codec> extends AbstractArray<T> {
|
||||
/**
|
||||
* @description Finds the index of the value in the array
|
||||
*/
|
||||
public 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
|
||||
|
||||
@@ -62,11 +62,11 @@ export class VecFixed<T extends Codec> extends AbstractArray<T> {
|
||||
/**
|
||||
* @description The length of the value when encoded as a Uint8Array
|
||||
*/
|
||||
public get encodedLength (): number {
|
||||
public override get encodedLength (): number {
|
||||
return this.reduce((total, entry) => total + entry.encodedLength, 0);
|
||||
}
|
||||
|
||||
public toU8a (): Uint8Array {
|
||||
public override toU8a (): Uint8Array {
|
||||
// we override, we don't add the length prefix for ourselves, and at the same time we
|
||||
// ignore isBare on entries, since they should be properly encoded at all times
|
||||
const encoded = this.map((entry) => entry.toU8a());
|
||||
|
||||
@@ -40,35 +40,35 @@ export class GenericEthereumAccountId extends U8aFixed {
|
||||
/**
|
||||
* @description Compares the value of the input to see if there is a match
|
||||
*/
|
||||
public eq (other?: unknown): boolean {
|
||||
public override eq (other?: unknown): boolean {
|
||||
return super.eq(decodeAccountId(other as AnyU8a));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
|
||||
*/
|
||||
public toHuman (): string {
|
||||
public override toHuman (): string {
|
||||
return this.toJSON();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Converts the Object to JSON, typically used for RPC transfers
|
||||
*/
|
||||
public toJSON (): string {
|
||||
public override toJSON (): string {
|
||||
return this.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
return GenericEthereumAccountId.encode(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return 'AccountId';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ export class GenericEthereumLookupSource extends Base<GenericEthereumAccountId |
|
||||
/**
|
||||
* @description The length of the value when encoded as a Uint8Array
|
||||
*/
|
||||
public get encodedLength (): number {
|
||||
public override get encodedLength (): number {
|
||||
const rawLength = this._rawLength;
|
||||
|
||||
return rawLength + (
|
||||
@@ -92,14 +92,14 @@ export class GenericEthereumLookupSource extends Base<GenericEthereumAccountId |
|
||||
/**
|
||||
* @description Returns a hex string representation of the value
|
||||
*/
|
||||
public toHex (): string {
|
||||
public override toHex (): string {
|
||||
return u8aToHex(this.toU8a());
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return 'Address';
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ export class GenericEthereumLookupSource extends Base<GenericEthereumAccountId |
|
||||
* @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)
|
||||
*/
|
||||
public toU8a (isBare?: boolean): Uint8Array {
|
||||
public override toU8a (isBare?: boolean): Uint8Array {
|
||||
const encoded = this._raw.toU8a().subarray(0, this._rawLength);
|
||||
|
||||
return isBare
|
||||
|
||||
@@ -73,7 +73,7 @@ abstract class ExtrinsicBase<A extends AnyTuple> extends Base<ExtrinsicVx | Extr
|
||||
/**
|
||||
* @description The length of the value when encoded as a Uint8Array
|
||||
*/
|
||||
public get encodedLength (): number {
|
||||
public override get encodedLength (): number {
|
||||
return this.toU8a().length;
|
||||
}
|
||||
|
||||
@@ -243,14 +243,14 @@ export class GenericExtrinsic<A extends AnyTuple = AnyTuple> extends ExtrinsicBa
|
||||
/**
|
||||
* @description Returns a hex string representation of the value
|
||||
*/
|
||||
public toHex (isBare?: boolean): string {
|
||||
public override toHex (isBare?: boolean): string {
|
||||
return u8aToHex(this.toU8a(isBare));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
|
||||
*/
|
||||
public toHuman (isExpanded?: boolean): AnyJson {
|
||||
public override toHuman (isExpanded?: boolean): AnyJson {
|
||||
return {
|
||||
isSigned: this.isSigned,
|
||||
method: this.method.toHuman(isExpanded),
|
||||
@@ -270,14 +270,14 @@ export class GenericExtrinsic<A extends AnyTuple = AnyTuple> extends ExtrinsicBa
|
||||
/**
|
||||
* @description Converts the Object to JSON, typically used for RPC transfers
|
||||
*/
|
||||
public toJSON (): string {
|
||||
public override toJSON (): string {
|
||||
return this.toHex();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return 'Extrinsic';
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ export class GenericExtrinsic<A extends AnyTuple = AnyTuple> extends ExtrinsicBa
|
||||
* @description Encodes the value as a Uint8Array as per the SCALE specifications
|
||||
* @param isBare true when the value is not length-prefixed
|
||||
*/
|
||||
public toU8a (isBare?: boolean): Uint8Array {
|
||||
public override toU8a (isBare?: boolean): Uint8Array {
|
||||
// we do not apply bare to the internal values, rather this only determines out length addition,
|
||||
// where we strip all lengths this creates an extrinsic that cannot be decoded
|
||||
const encoded = u8aConcat(new Uint8Array([this.version]), this._raw.toU8a());
|
||||
|
||||
@@ -113,7 +113,7 @@ export class MortalEra extends Tuple {
|
||||
/**
|
||||
* @description Encoded length for mortals occupy 2 bytes, different from the actual Tuple since it is encoded. This is a shortcut fro `toU8a().length`
|
||||
*/
|
||||
public get encodedLength (): number {
|
||||
public override get encodedLength (): number {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ export class MortalEra extends Tuple {
|
||||
/**
|
||||
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
|
||||
*/
|
||||
public toHuman (): any {
|
||||
public override toHuman (): any {
|
||||
return {
|
||||
period: formatNumber(this.period),
|
||||
phase: formatNumber(this.phase)
|
||||
@@ -144,7 +144,7 @@ export class MortalEra extends Tuple {
|
||||
/**
|
||||
* @description Returns a JSON representation of the actual value
|
||||
*/
|
||||
public toJSON (): any {
|
||||
public override toJSON (): any {
|
||||
return this.toHex();
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ export class MortalEra extends Tuple {
|
||||
* `period` is.
|
||||
*/
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
public toU8a (isBare?: boolean): Uint8Array {
|
||||
public override toU8a (isBare?: boolean): Uint8Array {
|
||||
const period = this.period.toNumber();
|
||||
const phase = this.phase.toNumber();
|
||||
const quantizeFactor = Math.max(period >> 12, 1);
|
||||
@@ -235,7 +235,7 @@ export class GenericExtrinsicEra extends Enum implements IExtrinsicEra {
|
||||
/**
|
||||
* @description Override the encoded length method
|
||||
*/
|
||||
public get encodedLength (): number {
|
||||
public override get encodedLength (): number {
|
||||
return this.isImmortalEra
|
||||
? this.asImmortalEra.encodedLength
|
||||
: this.asMortalEra.encodedLength;
|
||||
@@ -277,7 +277,7 @@ export class GenericExtrinsicEra extends Enum implements IExtrinsicEra {
|
||||
* @description Encodes the value as a Uint8Array as per the parity-codec specifications
|
||||
* @param isBare true when the value has none of the type-specific prefixes (internal)
|
||||
*/
|
||||
public toU8a (isBare?: boolean): Uint8Array {
|
||||
public override toU8a (isBare?: boolean): Uint8Array {
|
||||
return this.isMortalEra
|
||||
? this.asMortalEra.toU8a(isBare)
|
||||
: this.asImmortalEra.toU8a(isBare);
|
||||
|
||||
@@ -112,7 +112,7 @@ export class GenericExtrinsicPayload extends Base<ExtrinsicPayloadVx> {
|
||||
/**
|
||||
* @description Compares the value of the input to see if there is a match
|
||||
*/
|
||||
public eq (other?: unknown): boolean {
|
||||
public override eq (other?: unknown): boolean {
|
||||
return this._raw.eq(other);
|
||||
}
|
||||
|
||||
@@ -134,28 +134,28 @@ export class GenericExtrinsicPayload extends Base<ExtrinsicPayloadVx> {
|
||||
/**
|
||||
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
|
||||
*/
|
||||
public toHuman (isExtended?: boolean): AnyJson {
|
||||
public override toHuman (isExtended?: boolean): AnyJson {
|
||||
return this._raw.toHuman(isExtended);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Converts the Object to JSON, typically used for RPC transfers
|
||||
*/
|
||||
public toJSON (): any {
|
||||
public override toJSON (): any {
|
||||
return this.toHex();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
return this.toHex();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns a serialized u8a form
|
||||
*/
|
||||
public toU8a (isBare?: BareOpts): Uint8Array {
|
||||
public override toU8a (isBare?: BareOpts): Uint8Array {
|
||||
// call our parent, with only the method stripped
|
||||
return super.toU8a(isBare ? { method: true } : false);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ export class GenericExtrinsicV4 extends Struct implements IExtrinsicImpl {
|
||||
/**
|
||||
* @description The length of the value when encoded as a Uint8Array
|
||||
*/
|
||||
public get encodedLength (): number {
|
||||
public override get encodedLength (): number {
|
||||
return this.toU8a().length;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ export class GenericExtrinsicSignatureV4 extends Struct implements IExtrinsicSig
|
||||
/**
|
||||
* @description The length of the value when encoded as a Uint8Array
|
||||
*/
|
||||
public get encodedLength (): number {
|
||||
public override get encodedLength (): number {
|
||||
return this.isSigned
|
||||
? super.encodedLength
|
||||
: 0;
|
||||
@@ -181,7 +181,7 @@ export class GenericExtrinsicSignatureV4 extends Struct implements IExtrinsicSig
|
||||
* @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)
|
||||
*/
|
||||
public toU8a (isBare?: boolean): Uint8Array {
|
||||
public override toU8a (isBare?: boolean): Uint8Array {
|
||||
return this.isSigned
|
||||
? super.toU8a(isBare)
|
||||
: EMPTY_U8A;
|
||||
|
||||
@@ -43,35 +43,35 @@ export class GenericAccountId extends U8aFixed {
|
||||
/**
|
||||
* @description Compares the value of the input to see if there is a match
|
||||
*/
|
||||
public eq (other?: unknown): boolean {
|
||||
public override eq (other?: unknown): boolean {
|
||||
return super.eq(decodeAccountId(other as AnyU8a));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
|
||||
*/
|
||||
public toHuman (): string {
|
||||
public override toHuman (): string {
|
||||
return this.toJSON();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Converts the Object to JSON, typically used for RPC transfers
|
||||
*/
|
||||
public toJSON (): string {
|
||||
public override toJSON (): string {
|
||||
return this.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
return encodeAddress(this, this.registry.chainSS58);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return 'AccountId';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ export class GenericAccountIndex extends u32 {
|
||||
/**
|
||||
* @description Compares the value of the input to see if there is a match
|
||||
*/
|
||||
public eq (other?: unknown): boolean {
|
||||
public override eq (other?: unknown): boolean {
|
||||
// shortcut for BN or Number, don't create an object
|
||||
if (isBn(other as string) || isNumber(other)) {
|
||||
return super.eq(other);
|
||||
@@ -94,21 +94,21 @@ export class GenericAccountIndex extends u32 {
|
||||
/**
|
||||
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
|
||||
*/
|
||||
public toHuman (): string {
|
||||
public override toHuman (): string {
|
||||
return this.toJSON();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Converts the Object to JSON, typically used for RPC transfers
|
||||
*/
|
||||
public toJSON (): string {
|
||||
public override toJSON (): string {
|
||||
return this.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
const length = GenericAccountIndex.calcLength(this);
|
||||
|
||||
return encodeAddress(this.toU8a().subarray(0, length), this.registry.chainSS58);
|
||||
@@ -117,7 +117,7 @@ export class GenericAccountIndex extends u32 {
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return 'AccountIndex';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ export class GenericBlock extends Struct {
|
||||
/**
|
||||
* @description Block/header [[Hash]]
|
||||
*/
|
||||
public get hash (): CodecHash {
|
||||
public override get hash (): CodecHash {
|
||||
return this.header.hash;
|
||||
}
|
||||
|
||||
|
||||
@@ -216,7 +216,7 @@ export class GenericCall<A extends AnyTuple = AnyTuple> extends Struct implement
|
||||
/**
|
||||
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
|
||||
*/
|
||||
public toHuman (isExpanded?: boolean): Record<string, AnyJson> {
|
||||
public override toHuman (isExpanded?: boolean): Record<string, AnyJson> {
|
||||
let call: CallFunction | undefined;
|
||||
|
||||
try {
|
||||
@@ -244,7 +244,7 @@ export class GenericCall<A extends AnyTuple = AnyTuple> extends Struct implement
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return 'Call';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -103,21 +103,21 @@ export class GenericConsensusEngineId extends U8aFixed {
|
||||
/**
|
||||
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
|
||||
*/
|
||||
public toHuman (): string {
|
||||
public override toHuman (): string {
|
||||
return this.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return 'ConsensusEngineId';
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Override the default toString to return a 4-byte string
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
return this.isAscii
|
||||
? u8aToString(this)
|
||||
: u8aToHex(this);
|
||||
|
||||
@@ -151,7 +151,7 @@ export class GenericEvent extends Struct implements IEvent<Codec[]> {
|
||||
/**
|
||||
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
|
||||
*/
|
||||
public toHuman (isExpanded?: boolean): Record<string, AnyJson> {
|
||||
public override toHuman (isExpanded?: boolean): Record<string, AnyJson> {
|
||||
return {
|
||||
method: this.method,
|
||||
section: this.section,
|
||||
|
||||
@@ -69,7 +69,7 @@ export class GenericLookupSource extends Base<GenericAccountId | GenericAccountI
|
||||
/**
|
||||
* @description The length of the value when encoded as a Uint8Array
|
||||
*/
|
||||
public get encodedLength (): number {
|
||||
public override get encodedLength (): number {
|
||||
const rawLength = this._rawLength;
|
||||
|
||||
return rawLength + (
|
||||
@@ -92,14 +92,14 @@ export class GenericLookupSource extends Base<GenericAccountId | GenericAccountI
|
||||
/**
|
||||
* @description Returns a hex string representation of the value
|
||||
*/
|
||||
public toHex (): string {
|
||||
public override toHex (): string {
|
||||
return u8aToHex(this.toU8a());
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return 'Address';
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ export class GenericLookupSource extends Base<GenericAccountId | GenericAccountI
|
||||
* @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)
|
||||
*/
|
||||
public toU8a (isBare?: boolean): Uint8Array {
|
||||
public override toU8a (isBare?: boolean): Uint8Array {
|
||||
const encoded = this._raw.toU8a().subarray(0, this._rawLength);
|
||||
|
||||
return isBare
|
||||
|
||||
@@ -54,7 +54,7 @@ export class GenericMultiAddress extends Enum {
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
return this.value.toString();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ export class GenericVote extends U8aFixed {
|
||||
/**
|
||||
* @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information
|
||||
*/
|
||||
public toHuman (isExpanded?: boolean): AnyJson {
|
||||
public override toHuman (isExpanded?: boolean): AnyJson {
|
||||
return {
|
||||
conviction: this.conviction.toHuman(isExpanded),
|
||||
vote: this.isAye ? 'Aye' : 'Nay'
|
||||
@@ -115,7 +115,7 @@ export class GenericVote extends U8aFixed {
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return 'Vote';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,18 +53,18 @@ export class BitVec extends Raw {
|
||||
/**
|
||||
* @description The length of the value when encoded as a Uint8Array
|
||||
*/
|
||||
public get encodedLength (): number {
|
||||
public override get encodedLength (): number {
|
||||
return this.length + compactToU8a(this._decodedLength).length;
|
||||
}
|
||||
|
||||
public toHuman (): string {
|
||||
public override toHuman (): string {
|
||||
return `0b${[...this.toU8a(true)].map((d) => `00000000${d.toString(2)}`.slice(-8)).join('_')}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return 'BitVec';
|
||||
}
|
||||
|
||||
@@ -72,7 +72,7 @@ export class BitVec extends Raw {
|
||||
* @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)
|
||||
*/
|
||||
public toU8a (isBare?: boolean): Uint8Array {
|
||||
public override toU8a (isBare?: boolean): Uint8Array {
|
||||
const bitVec = super.toU8a();
|
||||
|
||||
return isBare
|
||||
|
||||
@@ -112,7 +112,7 @@ export class bool extends Boolean implements Codec {
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
return this.toJSON().toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -54,14 +54,14 @@ export class Bytes extends Raw {
|
||||
/**
|
||||
* @description The length of the value when encoded as a Uint8Array
|
||||
*/
|
||||
public get encodedLength (): number {
|
||||
public override get encodedLength (): number {
|
||||
return this.length + compactToU8a(this.length).length;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return 'Bytes';
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ export class Bytes extends Raw {
|
||||
* @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)
|
||||
*/
|
||||
public toU8a (isBare?: boolean): Uint8Array {
|
||||
public override toU8a (isBare?: boolean): Uint8Array {
|
||||
return isBare
|
||||
? super.toU8a(isBare)
|
||||
: compactAddLength(this);
|
||||
|
||||
@@ -61,61 +61,61 @@ export class Data extends Enum {
|
||||
assert(!this.isRaw || this.asRaw.length <= 32, 'Data.Raw values are limited to a maximum length of 32 bytes');
|
||||
}
|
||||
|
||||
get asBlakeTwo256 (): H256 {
|
||||
public get asBlakeTwo256 (): H256 {
|
||||
return this.value as H256;
|
||||
}
|
||||
|
||||
get asKeccak256 (): H256 {
|
||||
public get asKeccak256 (): H256 {
|
||||
return this.value as H256;
|
||||
}
|
||||
|
||||
get asRaw (): Bytes {
|
||||
public get asRaw (): Bytes {
|
||||
return this.value as Bytes;
|
||||
}
|
||||
|
||||
get asSha256 (): H256 {
|
||||
public get asSha256 (): H256 {
|
||||
return this.value as H256;
|
||||
}
|
||||
|
||||
get asShaThree256 (): H256 {
|
||||
public get asShaThree256 (): H256 {
|
||||
return this.value as H256;
|
||||
}
|
||||
|
||||
get isBlakeTwo256 (): boolean {
|
||||
public get isBlakeTwo256 (): boolean {
|
||||
return this.index === 2;
|
||||
}
|
||||
|
||||
get isKeccak256 (): boolean {
|
||||
public get isKeccak256 (): boolean {
|
||||
return this.index === 4;
|
||||
}
|
||||
|
||||
get isNone (): boolean {
|
||||
public override get isNone (): boolean {
|
||||
return this.index === 0;
|
||||
}
|
||||
|
||||
get isRaw (): boolean {
|
||||
public get isRaw (): boolean {
|
||||
return this.index === 1;
|
||||
}
|
||||
|
||||
get isSha256 (): boolean {
|
||||
public get isSha256 (): boolean {
|
||||
return this.index === 3;
|
||||
}
|
||||
|
||||
get isShaThree256 (): boolean {
|
||||
public get isShaThree256 (): boolean {
|
||||
return this.index === 5;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description The encoded length
|
||||
*/
|
||||
public get encodedLength (): number {
|
||||
public override get encodedLength (): number {
|
||||
return this.toU8a().length;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description Encodes the value as a Uint8Array as per the SCALE specifications
|
||||
*/
|
||||
public toU8a (): Uint8Array {
|
||||
public override toU8a (): Uint8Array {
|
||||
if (this.index === 0) {
|
||||
return new Uint8Array(1);
|
||||
} else if (this.index === 1) {
|
||||
|
||||
@@ -252,7 +252,7 @@ export class StorageKey<A extends AnyTuple = AnyTuple> extends Bytes implements
|
||||
/**
|
||||
* @description Returns the Human representation for this type
|
||||
*/
|
||||
public toHuman (): AnyJson {
|
||||
public override toHuman (): AnyJson {
|
||||
return this._args.length
|
||||
? this._args.map((arg) => arg.toHuman())
|
||||
: super.toHuman();
|
||||
@@ -261,7 +261,7 @@ export class StorageKey<A extends AnyTuple = AnyTuple> extends Bytes implements
|
||||
/**
|
||||
* @description Returns the raw type for this
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return 'StorageKey';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ export class Text extends String implements Codec {
|
||||
/**
|
||||
* @description The length of the value
|
||||
*/
|
||||
public get length (): number {
|
||||
public override get length (): number {
|
||||
// only included here since we ignore inherited docs
|
||||
return super.length;
|
||||
}
|
||||
@@ -138,7 +138,7 @@ export class Text extends String implements Codec {
|
||||
/**
|
||||
* @description Returns the string representation of the value
|
||||
*/
|
||||
public toString (): string {
|
||||
public override toString (): string {
|
||||
return this.#override || super.toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ export class Type extends Text {
|
||||
/**
|
||||
* @description Returns the base runtime type name for this instance
|
||||
*/
|
||||
public toRawType (): string {
|
||||
public override toRawType (): string {
|
||||
return 'Type';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user