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

Simplify getInputs function #745

Merged
merged 1 commit into from
Jun 12, 2020
Merged

Conversation

xiaoxiaojx
Copy link
Contributor

No description provided.

@jaredpalmer
Copy link
Owner

LGTM

@jaredpalmer jaredpalmer merged commit 14bfa39 into jaredpalmer:master Jun 12, 2020
@agilgur5
Copy link
Collaborator

@jaredpalmer would appreciate a heads-up before you come back and merge code very quickly. I have been handling this myself for some time and have been following a process...

I would also not have merged this because this actually further complicates it into a single return statement and further wraps the code, along with adding a cast in there.

I have had to unwrap similar code in the codebase before, such as in createBuildConfigs. The more you wrap something the more brittle and harder to refactor it becomes, a simplification would have been to unwrap it further, with the ternaries being a particularly good place to start

paul-vd pushed a commit to EezyQuote/tsdx that referenced this pull request Dec 1, 2020
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.

3 participants