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

Reduce code duplication on createPet function #270

Merged

Conversation

Technickel-Dev
Copy link
Contributor

While working on #255 I noticed that it was super annoying to have to paste the same arguments everywhere. This push reduces some of that code duplication by extracting out the pet creation arguments, making a more readable and maintainable function

@codecov-commenter
Copy link

Codecov Report

Merging #270 (ee9f0ba) into master (53fbfcd) will increase coverage by 0.10%.
The diff coverage is 0.00%.

@@            Coverage Diff            @@
##           master    #270      +/-   ##
=========================================
+ Coverage    8.25%   8.35%   +0.10%     
=========================================
  Files           3       3              
  Lines         642     634       -8     
  Branches       99      90       -9     
=========================================
  Hits           53      53              
+ Misses        589     581       -8     
Impacted Files Coverage Δ
src/panel/pets.ts 7.17% <0.00%> (+0.22%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Owner

@tonybaloney tonybaloney left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent contribution. I didn't know you could unpack in Typescript like this. Much easier to read.

@tonybaloney tonybaloney merged commit b8cfacc into tonybaloney:master Oct 17, 2022
tonybaloney added a commit that referenced this pull request Feb 26, 2023
Reduce code duplication on createPet function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants