import { AnyJsonArray, Codec, IHash } from '../types'; /** * @name AbstractArray * @description * This manages codec arrays. It is an extension to Array, providing * specific encoding/decoding on top of the base type. * @noInheritDoc */ export default abstract class AbstractArray extends Array implements Codec { /** * @description The length of the value when encoded as a Uint8Array */ readonly encodedLength: number; /** * @description returns a hash of the contents */ readonly hash: IHash; /** * @description Checks if the value is an empty value */ readonly isEmpty: boolean; /** * @description The length of the value */ readonly length: number; /** * @description Compares the value of the input to see if there is a match */ eq(other?: any): boolean; /** * @description Converts the Object to an standard JavaScript Array */ toArray(): T[]; /** * @description Returns a hex string representation of the value */ toHex(): string; /** * @description Converts the Object to JSON, typically used for RPC transfers */ toJSON(): AnyJsonArray; /** * @description Returns the base runtime type name for this instance */ abstract toRawType(): string; /** * @description Returns the string representation of the value */ toString(): 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) */ toU8a(isBare?: boolean): Uint8Array; /** * @description Filters the array with the callback * @param callbackfn The filter function * @param thisArg The `this` object to apply the result to */ filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[]; /** * @description Maps the array with the callback * @param callbackfn The mapping function * @param thisArg The `this` onject to apply the result to */ map(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[]; }