- Preparing search index...
- The search index is not available
Dappetizer
Methods
address
- address(value: string, argName: string, prefixes?: readonly AddressPrefix[]): string
-
Parameters
-
value: string
-
argName: string
-
Optional
prefixes: readonly AddressPrefix[]
Returns string
array
- array<T>(value: T, argName: string): T
-
Type Parameters
-
T extends readonly unknown[]
Returns T
enum
- enum<TEnum>(value: TEnum, argName: string, enumType: Readonly<Record<string, TEnum>>): TEnum
-
Parameters
-
value: TEnum
-
argName: string
-
enumType: Readonly<Record<string, TEnum>>
Returns TEnum
function
- function<T>(value: T, argName: string): T
-
Returns T
ifNotNullish
- ifNotNullish<T>(value: Nullish<T>, validate: ((value: T) => T)): Nullish<T>
-
Parameters
-
-
validate: ((value: T) => T)
nonEmptyArray
- nonEmptyArray<T>(value: T, argName: string): T
-
Type Parameters
-
T extends readonly unknown[]
Returns T
nonEmptyString
- nonEmptyString(value: string, argName: string): string
-
Parameters
-
value: string
-
argName: string
Returns string
nonWhiteSpaceString
- nonWhiteSpaceString(value: string, argName: string): string
-
Parameters
-
value: string
-
argName: string
Returns string
number
- number(value: number, argName: string, limits?: NumberLimits): number
-
Parameters
-
value: number
-
argName: string
-
Returns number
object
- object<T>(value: T, argName: string, constructor?: Constructor<T>): T
-
Parameters
-
value: T
-
argName: string
-
Optional
constructor: Constructor<T>
Returns T
oneOf
- oneOf<TSupported, TValue>(value: TValue, argName: string, supportedValues: readonly TSupported[]): TValue
-
Type Parameters
-
TSupported extends string
-
TValue extends string
Parameters
-
value: TValue
-
argName: string
-
supportedValues: readonly TSupported[]
Returns TValue
string
- string(value: string, argName: string, limits?: StringLimits): string
-
Parameters
-
value: string
-
argName: string
-
Returns string
Useful for validation of input arguments on public API.
Throws
ArgError