Skip to content
On this page

Type alias: TypedDataToPrimitiveTypes<TTypedData, TAbiParameterKind, TKeyReferences>

TypedDataToPrimitiveTypes: <TTypedData, TAbiParameterKind, TKeyReferences> { [K in keyof TTypedData]: { [K2 in TTypedData[K][number] as K2["name"]]: K2["type"] extends K ? Error$1<`Cannot convert self-referencing struct '${K2["type"]}' to primitive type.`> : K2["type"] extends keyof TTypedData ? K2["type"] extends keyof TKeyReferences ? Error$1<`Circular reference detected. '${K2["type"]}' is a circular reference.`> : TypedDataToPrimitiveTypes<Exclude<TTypedData, K>, TAbiParameterKind, TKeyReferences & { [_ in K2["type"]]: true }>[K2["type"]] : K2["type"] extends `${infer TType extends keyof TTypedData & string}[${infer Tail}]` ? AbiParameterToPrimitiveType<Merge<K2, Object>, TAbiParameterKind> : K2["type"] extends TypedDataType ? AbiParameterToPrimitiveType<K2, TAbiParameterKind> : Error$1<`Cannot convert unknown type '${K2["type"]}' to primitive type.`> } }

Converts TTypedData to corresponding TypeScript primitive types.

Type parameters

ParameterDefaultDescription
TTypedData extends TypedData-TypedData to convert
TAbiParameterKind extends AbiParameterKindAbiParameterKindOptional AbiParameterKind to narrow by parameter type
TKeyReferences extends {} | unknownunknown-

Defined In

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


Generated using TypeDoc and typedoc-plugin-markdown