Skip to content
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

cli/internal/codegen: TypeScript client has wrong type for json.RawMessage #73

Closed
eandre opened this issue Aug 24, 2021 · 0 comments
Closed
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@eandre
Copy link
Member

eandre commented Aug 24, 2021

Encore handles the json.RawMessage type specially and treats it as "arbitrary JSON" in generated clients.

However, the generated TypeScript client translates this to object. This is usually fine, but doesn't support arbitrary JSON values at the top level (like true or 5). We should change the generated code to using any for these types (or a more specific JSON type; see microsoft/TypeScript#1897).

@eandre eandre added bug Something isn't working good first issue Good for newcomers labels Aug 24, 2021
@eandre eandre self-assigned this Aug 24, 2021
@eandre eandre closed this as completed in 2875f48 Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant