name: Tuple

description: A Tuple defines an anonymous fixed-length array, where each element has its own type. It extends the base JS Array object.

Type parameters

S : Array<Constructor>

Hierarchy

Array<Codec>

↳ Tuple

↳ Seal

↳ OuterEventMetadataEvent

↳ EventData

↳ InherentOfflineReport

↳ KeyValueOption

↳ BftAuthoritySignature

↳ BftHashSignature

↳ RuntimeVersionApi

↳ NextAuthority

Implements

Indexable

[n: number]: Codec

Constructors

constructor

⊕ new Tuple(Types: S, value: any): Tuple

Defined in codec/Tuple.ts:19

Parameters:

Name Type
Types S
value any

Returns: Tuple


Properties

<Static> Array

● Array: ArrayConstructor

Defined in /home/travis/build/polkadot-js/api/node_modules/typescript/lib/lib.es5.d.ts:1358


Accessors

Types

getTypes(): Array<string>

Defined in codec/Tuple.ts:75

description: The types definition of the tuple

Returns: Array<string>


encodedLength

getencodedLength(): number

Defined in codec/Tuple.ts:66

description: The length of the value when encoded as a Uint8Array

Returns: number


Methods

filter

▸ filter(callbackfn: function, thisArg?: any): Array<Codec>

Overrides Array.filter

Defined in codec/Tuple.ts:131

description: Filters the array with the callback

Parameters:

Name Type Description
callbackfn function The filter function
Optional thisArg any The `this` object to apply the result to

Returns: Array<Codec>


map

▸ map<U>(callbackfn: function, thisArg?: any): Array<U>

Overrides Array.map

Defined in codec/Tuple.ts:140

description: Maps the array with the callback

Type parameters:

U

Parameters:

Name Type Description
callbackfn function The mapping function
Optional thisArg any The `this` onject to apply the result to

Returns: Array<U>


toArray

▸ toArray(): Array<Codec>

Defined in codec/Tuple.ts:82

description: Converts the Object to an standard JavaScript Array

Returns: Array<Codec>


toHex

▸ toHex(): string

Implementation of Codec.toHex

Defined in codec/Tuple.ts:89

description: Returns a hex string representation of the value

Returns: string


toJSON

▸ toJSON(): any

Implementation of Codec.toJSON

Defined in codec/Tuple.ts:96

description: Converts the Object to JSON, typically used for RPC transfers

Returns: any


toString

▸ toString(): string

Implementation of Codec.toString

Overrides Array.toString

Defined in codec/Tuple.ts:105

description: Returns the string representation of the value

Returns: string


toU8a

▸ toU8a(isBare?: undefined | false | true): Uint8Array

Implementation of Codec.toU8a

Defined in codec/Tuple.ts:114

description: Encodes the value as a Uint8Array as per the parity-codec specifications

Parameters:

Name Type Description
Optional isBare undefined | false | true true when the value has none of the type-specific prefixes (internal)

Returns: Uint8Array


<Static> with

▸ with<S>(Types: S): Constructor<Tuple<S>>

Defined in codec/Tuple.ts:53

Type parameters:

S : Array<Constructor>

Parameters:

Name Type
Types S

Returns: Constructor<Tuple<S>>


results matching ""

    No results matching ""