Skip to content

Using default parameters instead of conditions#21

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

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

Conversation

@fumegalli

@fumegalli fumegalli commented Dec 9, 2022

Copy link
Copy Markdown

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

@AldwinPagan AldwinPagan left a comment

Copy link
Copy Markdown

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