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

fix(format): allow undefined decimals #120

Merged
merged 3 commits into from
Oct 8, 2024
Merged

fix(format): allow undefined decimals #120

merged 3 commits into from
Oct 8, 2024

Conversation

oumar-fall
Copy link
Contributor

The goal is to allow the format operator to accept nullable decimals in case where value is itself nullable.

In this way, the typing is:

  • format(bigint, number): string
  • format(bigint | undefined, number): string | undefined
  • format(bigint | null, number): string | null
  • format(bigint | undefined | null, number): string | undefined | null
  • format(bigint, number | undefined): string | undefined
  • format(bigint, number | null): string | null
  • format(bigint, number | undefined | null): string | undefined | null
  • format(bigint | undefined, number | null): string | undefined | null
  • format.default(string).(bigint | undefined | null, number | undefined | null): string

@oumar-fall oumar-fall requested a review from Rubilmax October 8, 2024 09:01
@oumar-fall oumar-fall self-assigned this Oct 8, 2024
Rubilmax
Rubilmax previously approved these changes Oct 8, 2024
@oumar-fall oumar-fall merged commit f97451e into main Oct 8, 2024
22 checks passed
@oumar-fall oumar-fall deleted the fix/format-typing branch October 8, 2024 09:40
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.

2 participants