Skip to content

Using default parameters instead of conditions#21

Open
fumegalli wants to merge 1 commit intostemmlerjs:masterfrom
fumegalli:feature/use-default-parameter-instead-of-condition
Open

Using default parameters instead of conditions#21
fumegalli wants to merge 1 commit intostemmlerjs:masterfrom
fumegalli:feature/use-default-parameter-instead-of-condition

Conversation

@fumegalli
Copy link
Copy Markdown

@fumegalli fumegalli commented Dec 9, 2022

I did a commit to fix every case of #20 about using default parameters instead of conditions.
In some cases Typescript correctly inferred the type. When it didn't, I added the definition.
The issue contain more detailed information.

close #20

Copy link
Copy Markdown

@AldwinPagan AldwinPagan left a comment

Choose a reason for hiding this comment

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

Seems cleaner than doing the conditions.
The only thing that worries me is the PR to master. @stemmlerjs is there any guideline to do this kind of PRs?

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.

Use default parameters instead of thernary operator

2 participants