Type alias TypeMap<Input, IO>

TypeMap<Input, IO>: { [ Key in keyof Input]: Input[Key] extends keyof Type ? Type[Input[Key]][IO] : unknown }

Map an array of types to an array of their input or output types.

Refer to Type to see which types are supported.

Example

type OutputTypes = Map<[`uint256`, `bytes[]`, `string[2]`], 'output'>;
// Results in: [bigint, Uint8Array[], string[]]

Type Parameters

  • Input extends readonly (keyof Type | string)[]

  • IO extends "input" | "output"