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

[Tooling] Fix React Native types #137

Open
javamonn opened this issue Nov 30, 2018 · 1 comment
Open

[Tooling] Fix React Native types #137

javamonn opened this issue Nov 30, 2018 · 1 comment

Comments

@javamonn
Copy link
Contributor

As noted here, palette is currently typed with DOM types regardless of the runtime platform.

Emission currently type-checks, but as a result, TypeScript would erroneously allow a DOM-only prop to be passed without error.

There was some initial exploration work towards fixing this in https://github.com/javamonn/palette/tree/upgrade-typings, though I'm not sure it's the best way forward - it seems like we might need separate stsconfig`s and separate builds.

@javamonn
Copy link
Contributor Author

An instance in Emission where this caused a type error we had to workaround with a cast: https://github.com/artsy/emission/pull/1223/files#diff-ec3ba1930b2ad578adef27656b4b5cacR18

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

No branches or pull requests

1 participant