Multicall: Type instantiation is excessively deep and possibly infinite
Doko-Demo-Doa opened this issue · comments
Describe the bug
That error appeared even when I supply an empty array to the multicall function:
Link to Minimal Reproducible Example
No response
Steps To Reproduce
Just use multicall with empty array supplied to contracts
, then you can see it in VSCode:
const vestingsData = await multicall(teamFinanceWagmiConfig, {
contracts: [],
})
Wagmi Version
2.5.19
Viem Version
2.9.15
TypeScript Version
5.3.3
Check existing issues
- I checked there isn't already an issue for the bug I encountered.
Anything else?
No response
I can't reproduce this in my minimal reproduction: https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgCxjMAaOBjKBTAQxjwGEIA7AM2AHMsQBXAGxmGwKabgF85KoIIOAHIAAgHcCNEMAD02aHmEAoUJFiI4IAsHLk8MLAGc8kJsAI8+AoWMnS5C-POQ7yRlcrwAPdfAXu-hTUNHAAvDj4RKTBtAAUCMpwOK66RgBccADa2rr6hnAmZhYAuhhJcDBQBO5+GYgVyTlu+QB0wAAmJZmo6HEAlOXJTUUQ5gTtXT1oYANDPOXc-crKAUbw+EbM8BEEksDwjCxsHExxASFYickBVQTYMPVZZcpLQA
Could you please provide a minimal reproducible example via a separate repo (or TypeScript playground), and open a new issue? Thanks!
Found a solution, I have to put "strictNullChecks": true,
to tsconfig.json
. That means I have to also modify some other files to comply with the null checks, but it's ok.
This issue has been locked since it has been closed for more than 14 days.
If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest wagmi version. If you have any other comments you can create a new discussion.