Repository navigation
Add ES2022 Intl.Segmenter type - #48800
Daniel Rosenwasser (DanielRosenwasser) merged 5 commits into
Conversation
Intl.Segmenter type
Jake Bailey (jakebailey)
left a comment
There was a problem hiding this comment.
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.
|
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. |
|
The syntax section implies that you have to provide 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 |
|
I did weigh up the syntax section when writing that comment. Thank you for clarifying my understanding of this. I really appreciate it. |
Fixes #48523