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

Source

node_modules/.pnpm/@ethereumjs+util@9.0.3/node_modules/@ethereumjs/util/dist/esm/types.d.ts:35

toType(input, outputType)

toType<T>(input, outputType): undefined

Type parameters

T extends TypeOutput

Parameters

input: undefined

outputType: T

Returns

undefined

Source

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

toType(input, outputType)

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

Type parameters

T extends TypeOutput

Parameters

input: ToBytesInputTypes

outputType: T

Returns

TypeOutputReturnType[T]

Source

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