Skip to content

Type instantiation is excessively deep and possibly infinite on Typescript when extending Viem #2489

Closed Answered by gndelia
gndelia asked this question in Question
Discussion options

You must be logged in to vote

I was able to solve this - here is the updated playground. The trick was to use type Client which is exported from viem, instead of type PublicClient. It seems extend() expects the viem client instance is of type Client rather than PublicClient.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by gndelia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant