Skip to content

toType

toType(input, outputType)

toType<T>(input, outputType): null

Convert an input to a specified type. Input of null/undefined returns null/undefined regardless of the output type.

Type Parameters

T extends TypeOutput

Parameters

input: null

value to convert

outputType: T

type to output

Returns

null

Defined in

node_modules/.pnpm/@ethereumjs+util@9.1.0/node_modules/@ethereumjs/util/dist/esm/types.d.ts:36

toType(input, outputType)

toType<T>(input, outputType): undefined

Type Parameters

T extends TypeOutput

Parameters

input: undefined

outputType: T

Returns

undefined

Defined in

node_modules/.pnpm/@ethereumjs+util@9.1.0/node_modules/@ethereumjs/util/dist/esm/types.d.ts:37

toType(input, outputType)

toType<T>(input, outputType): TypeOutputReturnType[T]

Type Parameters

T extends TypeOutput

Parameters

input: ToBytesInputTypes

outputType: T

Returns

TypeOutputReturnType[T]

Defined in

node_modules/.pnpm/@ethereumjs+util@9.1.0/node_modules/@ethereumjs/util/dist/esm/types.d.ts:38