Skip to content

Type error for FormatNumberOptions after react-intl 7.0.0 #4717

@roderickhsiao

Description

@roderickhsiao

Which package?

react-intl
Since this is a monorepo. Please specify which package this bug report is for.

Describe the bug

formatNumber(number, {
  roundingMode: 'floor',        
}),
Object literal may only specify known properties, and 'roundingMode' does not exist in type 'FormatNumberOptions'.
           roundingMode: 'floor',
             ~~~~~~~~~~~~

Rounding mode should be a valid config

The issue is not happening at react-intl 6.0.0, probably regression on removing the in-house type definition?
We are at Typescript 5

A clear and concise description of what the bug is.

To Reproduce

Codesandbox URL

Please include a codesandbox URL if possible

Reproducible Steps/Repo

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy