graphql-zeus icon indicating copy to clipboard operation
graphql-zeus copied to clipboard

Inferred type exceeds the maximum length the compiler will serialize

Open donferi opened this issue 2 years ago • 0 comments

Hello,

I'm trying to create a couple of wrapper functions where I accept a generic of TData extends ValueTypes['Query'] but when I use this with a declaration: true in tsconfig I get TS error.

The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.

I'm working on a library so I can't disable declaration: true. I created a small repro that reproduces this here: https://github.com/donferi/zeus-ts/blob/690211ccfad13e492b0d0ee3186ace1841d476de/src/example.ts#L10:L13

In that same repo I have an example with genql and it seems to be working fine, added it just in case it sparks some ideas of how this could potentially work.

donferi avatar Oct 26 '23 16:10 donferi