GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Add ES2022 `Intl.Segmenter` type by petamoriken · Pull Request #48800 · microsoft/TypeScript

Conversation

@petamoriken

@petamoriken Kenta Moriuchi (petamoriken) commented Apr 21, 2022

Copy link
Copy Markdown
Contributor

Fixes #48523

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Kenta Moriuchi (petamoriken) added 2 commits April 21, 2022 20:45
@petamoriken
Add Intl.Segmenter type
385e5d3
@petamoriken
Update baseline
03b2658
@typescript-bot TypeScript Bot (typescript-bot) added the For Backlog Bug PRs that fix a backlog bug label Apr 21, 2022
@petamoriken Kenta Moriuchi (petamoriken) changed the title Feature/intl.segmenter Add ES2022 Intl.Segmenter type Apr 21, 2022
@sandersn
Nathan Shively-Sanders (sandersn) requested review from Jake Bailey (jakebailey) and Nathan Shively-Sanders (sandersn) May 4, 2022 15:26
@sandersn Nathan Shively-Sanders (sandersn) self-assigned this May 4, 2022
jakebailey
Jake Bailey (jakebailey) reviewed May 4, 2022
View reviewed changes

@jakebailey Jake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This is a nit, but it looks like every other lib d.ts file is formatted with four spaces, the standard we use in this repo, while the file added here uses two.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

petamoriken reacted with eyes emoji
All reactions
  • 👀 1 reaction
Comment thread src/lib/es2022.intl.d.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

Kenta Moriuchi (petamoriken) added 3 commits May 5, 2022 18:15
@petamoriken
Fix useless generics
3693bac
@petamoriken
Fix indent size
ecef40a
@petamoriken
Fix ResolvedSegmenterOptions
979c5df
jakebailey
Jake Bailey (jakebailey) approved these changes May 5, 2022
View reviewed changes
@DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser) merged commit 4a0b083 into microsoft:main May 6, 2022
@petamoriken
Kenta Moriuchi (petamoriken) deleted the feature/intl.segmenter branch May 6, 2022 03:28
@petamoriken Kenta Moriuchi (petamoriken) mentioned this pull request May 6, 2022
Intl.Segmenter TypeScript error denoland/deno#14182
Closed
@leoriviera

Leo. (leoriviera) commented May 17, 2022

Copy link
Copy Markdown

Taking a looking at the MDN article for this, the locale is optional, meaning the first argument may be an object containing options for the segmenter.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jakebailey

Jake Bailey (jakebailey) commented May 17, 2022

Copy link
Copy Markdown
Member

The syntax section implies that you have to provide locales if you want to supply options. The definition in this PR already makes it optional in that way (pass undefined).

If you pass an options object as the first parameter, the Segmenter you get back doesn't work properly, so I don't think that's correct (even if it doesn't crash). Try deleting 'fr' from the code example on the page and run it, then compare if you pass undefined.

leoriviera reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@leoriviera

Leo. (leoriviera) commented May 17, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

I did weigh up the syntax section when writing that comment. Thank you for clarifying my understanding of this. I really appreciate it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@jakebailey Jake Bailey (jakebailey) jakebailey approved these changes
@sandersn Nathan Shively-Sanders (sandersn) Awaiting requested review from sandersn

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@sandersn Nathan Shively-Sanders (sandersn)

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

PR Backlog
Archived in project

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Missing type of ES2022 Intl.Segmenter

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@petamoriken @leoriviera @jakebailey @sandersn @DanielRosenwasser @typescript-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.