Type alias: ParseAbiParameter<TParam>
ParseAbiParameter: <
TParam
>TParam
extendsstring
?TParam
extends""
?never
:string
extendsTParam
?AbiParameter
:ParseAbiParameter$1
<TParam
, {Modifier
:Modifier
;} > :never
|TParam
extends readonlystring
[] ?string
[] extendsTParam
?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
extendsundefined
?never
:Result
:never
:never
:never
:never
Parses human-readable ABI parameter into AbiParameter
Example
type Result = ParseAbiParameter<'address from'>
// ^? type Result = { type: "address"; name: "from"; }
Example
type Result = ParseAbiParameter<
// ^? type Result = { type: "tuple"; components: [{ type: "string"; name:...
['Baz bar', 'struct Baz { string name; }']
>
Type parameters
Parameter | Description |
---|---|
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