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
Add ios type-checking #491
Conversation
Deploy preview for artsy-palette ready! Built with commit eea9c24 |
"baseUrl": ".", | ||
"paths": { | ||
"./*": ["./*.ios", "./*"], | ||
"../*": ["../*.ios", "../*"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this one for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meannn... ./
and ../
are different paths technically.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and simple 👍 Will wait for @alloy and / or @ashfurrow to approve before merging tho. (Also want to add microsoft/TypeScript#8328 as a reference per previous slack discussions.)
"compilerOptions": { | ||
"baseUrl": ".", | ||
"paths": { | ||
"./*": ["./*.ios", "./*"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:ceiling-cat:
Can I suggest adding a link to microsoft/TypeScript#8328 (comment) in a comment here? This is a fairly advanced bit of config and it might save someone some googling one day.
:ceiling-cat-out:
Niiice! I recall there not being a solution last time around, but that can’t have been in 2016… so not sure why we didn’t go with this last time around 🤔 Anyways, glad that we have this now 👍 I agree with @ds300 about leaving a comment. Not sure if tsconfig is json5, if not you should add that context to the commit message. |
Can't really do a comment (it's not json5), but I'll update the commit message. |
See this comment for the initial inspiration: microsoft/TypeScript#8328 (comment) This change adds a new ts config file that overwrites it's module resolution behavior. When importing a relative file it first tries to find a *.ios version of the file. This is in line with how react-native handles platform specific implementations.
Thanks 🙏 Btw, pretty sure tsconfig files are json5! At least tsc treats them as such and has done for years so most TS tooling should have caught up. |
🚀 PR was released in v4.14.4 🚀 |
Figured out how to get a type-checking task working for iOS!!