Skip to content

update types on formatToParts#20127

Merged
hamishwillee merged 4 commits intomdn:mainfrom
romulocintra:fix-#516
Nov 6, 2022
Merged

update types on formatToParts#20127
hamishwillee merged 4 commits intomdn:mainfrom
romulocintra:fix-#516

Conversation

@romulocintra
Copy link
Copy Markdown
Contributor

@romulocintra romulocintra commented Aug 30, 2022

Summary

This PR fixes #516 by adding missing types to NumberFormat/formatToParts

Motivation

Supporting details

https://tc39.es/proposal-intl-numberformat-v3/out/numberformat/proposed.html#sec-partitionnumberpattern

Related issues

Metadata

  • Adds a new document
  • Rewrites (or significantly expands) a document
  • Fixes a typo, bug, or other error

@romulocintra romulocintra requested a review from a team as a code owner August 30, 2022 13:29
@romulocintra romulocintra requested review from Elchi3 and removed request for a team August 30, 2022 13:29
@github-actions github-actions Bot added the Content:JS JavaScript docs label Aug 30, 2022
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 30, 2022

Preview URLs

(this comment was updated 2022-11-06 22:31:43.982202)


Possible types are the following:

- compact
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not introduced by your PR, but could you add code formatting to every type?

- : The unit string, such as the "l" or "litres", depending on how
`unitDisplay` is specified.
- unknown
- : The string for `unknown` type results
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are there specific examples?

…rformat/formattoparts/index.md

Co-authored-by: Joshua Chen <[email protected]>
@Josh-Cena
Copy link
Copy Markdown
Member

@romulocintra We're not in a hurry since we are working on a 1.5 year old issue anyway, but do you plan to add an example with unknown? If I could help you get it through I would; unfortunately I don't have much domain knowledge about this...

@Josh-Cena
Copy link
Copy Markdown
Member

Pinging @romulocintra in case you are interested in finishing this up. Otherwise I would push to the branch myself.

@Josh-Cena Josh-Cena added the awaiting response Awaiting for author to address review/feedback label Oct 10, 2022
Copy link
Copy Markdown
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

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

LGTM. Yes you could perhaps look at examples and so on, but let's get this in.

@hamishwillee hamishwillee merged commit c1f5a4a into mdn:main Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting response Awaiting for author to address review/feedback Content:JS JavaScript docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue with "Intl.NumberFormat.prototype.formatToParts()": type: 'compact' is missing

3 participants