-
Notifications
You must be signed in to change notification settings - Fork 346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript "inferred type ... exceeds maximum" error with Exact #449
Comments
Wow, how many fields do you have in you messages? I suppose we could detect "this message has more than ...I almost wonder if we shouldn't just use a |
Not a lot, in one message that fails to compile I only have 5 fields. But I suspect that this might be an issue due to the use of recursion. Other people solved the issue by altering their recursive function/combined type use: Stackoverflow, microsoft/TypeScript#43817 Regarding the class usage: When I first go started with the library the separation of data/implementation confused me a bit. It might be easier to use if both are together in one class. If you want, I can give you access to our proto library. |
I tried commenting the |
@jacobfederer we just added an option to disable the If it does, it'd be really great to have a minimal Thanks! |
@stephenh I tested it yesterday, it works well. Tsc compiled it a lot faster. I'll provide a minimal reproduction when I'm back from my holidays (start of the next week). |
Generating code from Temporal.io API (https://github.com/temporalio/api/tree/master/temporal/api) will produce JS code failing with the same error, if using a ts-proto version later than 1.91.0 |
Confirming last working version was 1.91.0 |
Late reply, but right @mvniekerk the |
…d issue for types .d.ts, ref: stephenh/ts-proto#449
I'm trying to distribute the generated proto classes/constants inside a npm library. Therefore I need to compile the Typescript code into JS using tsc. However this fails due to an tsc error:
My first idea was to shorten the proto files and to move messages into more files, but this doesn't seem to help.
How can I attach a "type annotation" ? Is there a way to distribute Typescript files without compiling them?
The text was updated successfully, but these errors were encountered: