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

Adding in typescript_type to the js_sys types #2028

Merged
merged 1 commit into from
Mar 4, 2020

Conversation

Pauan
Copy link
Contributor

@Pauan Pauan commented Mar 4, 2020

This gives proper TypeScript types to all of the js_sys types, so they won't show up as any.

This is technically a breaking change, but I think that's okay because:

  • I expect the breakage to be very minimal since it would only affect people who were passing in the wrong type.

  • By default TypeScript doesn't halt compilation when an error happens, so TypeScript errors are really more like warnings.

  • If the user's code does break, they can just use foo as any to fix it.

@alexcrichton alexcrichton merged commit 5a752e5 into rustwasm:master Mar 4, 2020
@alexcrichton
Copy link
Contributor

Nice!

@Pauan Pauan deleted the improved-typescript-types branch March 4, 2020 05:39
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.

2 participants