-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Refactor options processor v2 #4492
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
henrikra
changed the title
[WIP] Refactor options processor v2
Refactor options processor v2
Dec 24, 2018
guyca
approved these changes
Dec 24, 2018
Looks great! I'll merge 👍 |
vshkl
pushed a commit
to vshkl/react-native-navigation
that referenced
this pull request
Feb 5, 2020
## Goal of this PR The goal of this PR is to make `OptionsProcessor.ts` great again 🇺🇸 . To me it was total mess including tests. ## What was wrong or funky? 1. the tests tested if React Native's `processColor` color works as it should even though react native has [multiple tests for this](https://github.com/facebook/react-native/blob/master/Libraries/StyleSheet/__tests__/processColor-test.js). Aka we don't have to test React Native's functions :D 2. `LayoutTreeCrawler.test.ts` was testing `OptionsProcessor`s functionality so it was removed now 3. Lots of small things since this was done before putting `noImplicitAny` to true so it wasn't made TypeScript in mind ## Result Now `OptionsProcessor.ts` should be 1. code way more clear 2. tests are testing only things that they should 3. tests are written in clear way 4. it is easy to see from the tests what the whole function does 5. type safe for TypeScript `noImplicitAny` (when we actually turn it on)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal of this PR
The goal of this PR is to make
OptionsProcessor.ts
great again 🇺🇸 . To me it was total mess including tests.What was wrong or funky?
processColor
color works as it should even though react native has multiple tests for this. Aka we don't have to test React Native's functions :DLayoutTreeCrawler.test.ts
was testingOptionsProcessor
s functionality so it was removed nownoImplicitAny
to true so it wasn't made TypeScript in mindResult
Now
OptionsProcessor.ts
should benoImplicitAny
(when we actually turn it on)