Skip to content

Data type judgment and optimization #124

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

Closed
AZQD opened this issue Nov 16, 2019 · 2 comments
Closed

Data type judgment and optimization #124

AZQD opened this issue Nov 16, 2019 · 2 comments

Comments

@AZQD
Copy link

AZQD commented Nov 16, 2019

If shorthandblacklist, the second parameter of the tranform function, misuses a string, such as' fontmargin ', abbreviations are also allowed.

Maybe it's more rigorous to add typescript or verify data type here.
https://github.com/styled-components/css-to-react-native/blob/master/src/index.js#L85

@jacobp100
Copy link
Contributor

Yeah, that's a good should. Maybe we should remove the default argument, then Array.isArray(shorthandBlacklist) && shorthandBlacklist.includes(…) - we should get a perf win from that too

@jacobp100
Copy link
Contributor

Gonna close this, but feel free to submit a PR if you want

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

2 participants