Skip to content
On this page

Type alias: ParseAbiParameter<TParam>

ParseAbiParameter: <TParam> TParam extends string ? TParam extends "" ? never : string extends TParam ? AbiParameter : ParseAbiParameter$1< TParam, {Modifier: Modifier;} > : never | TParam extends readonly string[] ? string[] extends TParam ? AbiParameter : ParseStructs< TParam > extends infer Structs ? { [K in keyof TParam]: TParam[K] extends string ? IsStructSignature<TParam[K]> extends true ? never : ParseAbiParameter$1<TParam[K], Object> : never } extends infer Mapped ? Filter< Mapped, never >[0] extends infer Result ? Result extends undefined ? never : Result : never : never : never : never

Parses human-readable ABI parameter into AbiParameter

Example

ts
type Result = ParseAbiParameter<'address from'>
//   ^? type Result = { type: "address"; name: "from"; }

Example

ts
type Result = ParseAbiParameter<
  // ^? type Result = { type: "tuple"; components: [{ type: "string"; name:...
  ['Baz bar', 'struct Baz { string name; }']
>

Type parameters

ParameterDescription
TParam extends string | readonly string[] | readonly unknown[]Human-readable ABI parameter

Defined In

node_modules/.pnpm/abitype@0.7.1_typescript@4.9.5/node_modules/abitype/dist/index.d.ts:582


Generated using TypeDoc and typedoc-plugin-markdown