Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore: typescript to accept null golang maps #17435

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Emyrk
Copy link
Member

@Emyrk Emyrk commented Apr 16, 2025

Golang can encode maps as null. The Record type is therefore not sufficient to fully describe the data.

https://go.dev/play/p/N2BJVhMCKXu

We can get errors like this: #17430
Screenshot From 2025-04-16 15-40-44

Golang can encode maps as `null`. The `Record` type is therefore
not sufficient to fully describe the data.
@Emyrk Emyrk force-pushed the stevenmasley/nullable_maps branch from 1c5984d to 5068814 Compare April 28, 2025 17:22
@github-actions github-actions bot added the stale This issue is like stale bread. label May 6, 2025
@BrunoQuaresma
Copy link
Collaborator

I'm wondering if they should be null or undefined 🤔 if they are not present in the response at all, I would use undefined. Do you need help to fix the FE type errors?

@Emyrk
Copy link
Member Author

Emyrk commented May 7, 2025

I'm wondering if they should be null or undefined 🤔 if they are not present in the response at all, I would use undefined. Do you need help to fix the FE type errors?

@BrunoQuaresma It is null.

https://go.dev/play/p/N2BJVhMCKXu

{"Map":null}

Yes, I was looking for an FE engineer to take this PR and fixup the FE changes. The typesGenerated.ts is correct in this PR to build off of.

@BrunoQuaresma
Copy link
Collaborator

Awesome, I will take a look into this during this week 👍 Awesome work!

@github-actions github-actions bot removed the stale This issue is like stale bread. label May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants