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

Map field TypeScript types shouldn't imply all keys exist #5

Merged
merged 1 commit into from
Aug 14, 2020

Conversation

glasser
Copy link
Member

@glasser glasser commented Aug 13, 2020

The type {[k: string]: number} implies that if you look up ANY string in the
object, you will definitely get a number. This is not appropriate for finite
protobufs.

I regenerated some files with npm run build && npm run types && node scripts/gentests.js though I don't really understand what the tests/data files
are used for.

The type `{[k: string]: number}` implies that if you look up ANY string in the
object, you will definitely get a number. This is not appropriate for finite
protobufs.

I regenerated some files with `npm run build && npm run types && node
scripts/gentests.js` though I don't really understand what the tests/data files
are used for.
@glasser glasser merged commit 2c41530 into master Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants