types_utils
@polymeshassociation/polymesh-sdk / Modules / types/utils
Module: types/utils
Table of contents
Type Aliases
Type Aliases
ArgsType
Ƭ ArgsType<T
>: T
extends (...args
: infer A) => unknown
? A
: never
Less strict version of Parameters
Type parameters
T
Defined in
Ensured
Ƭ Ensured<T
, K
>: Required
<Pick
<T
, K
>>
Pick a single property from T and ensure it is defined
Type parameters
T
T
K
extends keyof T
Defined in
HumanReadableType
Ƭ HumanReadableType<T
>: T
extends Entity
<unknown
, infer H> ? HumanReadableType
<H
> : T
extends BigNumber
? string
: T
extends Date
? string
: T
extends object
? { [K in keyof T]: T[K] extends Entity<unknown, infer E> ? HumanReadableType<E> : HumanReadableType<T[K]> } : T
Recursively traverse a type and transform its Entity properties into their human readable version (as if .toHuman
had been called on all of them)
Type parameters
T
Defined in
Modify
Ƭ Modify<T
, R
>: Omit
<T
, keyof R
> & R
Override T with the properties of R
Type parameters
T
R
Defined in
Mutable
Ƭ Mutable<Immutable
>: { -readonly [K in keyof Immutable]: Immutable[K] }
Type parameters
Immutable
Defined in
WithRequired
Ƭ WithRequired<T
, K
>: T
& { [P in K]-?: T[P] }
Ensure a specific property of T is defined
Type parameters
T
T
K
extends keyof T
Defined in
Last updated