Skip to main content
Version: 26.0.0-beta.2

Module: utils

Type Aliases

ArgsType

Ƭ ArgsType<T>: T extends (...args: infer A) => unknown ? A : never

Less strict version of Parameters<T>

Type parameters

Name
T

Defined in

types/utils/index.ts:29


Ensured

Ƭ Ensured<T, K>: Required<Pick<T, K>> & { [SubKey in K]: NonNullable<T[SubKey]> }

Pick a single property from T and ensure it is defined

Type parameters

NameType
TT
Kextends keyof T

Defined in

types/utils/index.ts:87


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

Name
T

Defined in

types/utils/index.ts:35


Modify

Ƭ Modify<T, R>: Omit<T, keyof R> & R

Override T with the properties of R

Type parameters

Name
T
R

Defined in

types/utils/index.ts:76


PaginatedQueryArgs

Ƭ PaginatedQueryArgs<T>: T & { size?: number ; start?: number }

Type parameters

Name
T

Defined in

types/utils/index.ts:91


QueryArgs

Ƭ QueryArgs<T, K>: { [P in K]?: T[P] }

Type parameters

NameType
TT
Kextends keyof T

Defined in

types/utils/index.ts:96


WithRequired

Ƭ WithRequired<T, K>: T & { [P in K]-?: T[P] }

Ensure a specific property of T is defined

Type parameters

NameType
TT
Kextends keyof T

Defined in

types/utils/index.ts:82