Skip to content

Add strongly typed options to Intl modules #194

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

Closed

Conversation

glennsl
Copy link
Contributor

@glennsl glennsl commented Feb 15, 2024

No description provided.

@glennsl glennsl force-pushed the feat/intl/strongly-typed-options branch from 46e3457 to 8298258 Compare February 15, 2024 09:13
@zth
Copy link
Collaborator

zth commented Feb 15, 2024

Good stuff @glennsl ! Ready to merge?

@glennsl
Copy link
Contributor Author

glennsl commented Feb 15, 2024

As far as I'm aware, yes. I wouldn't count out having made some mistakes though, so a thorough review wouldn't be a bad idea.

@cknitt
Copy link
Member

cknitt commented Feb 15, 2024

@glennsl Thanks!

There is also #65 (a more encompassing Intl bindings PR). One difference I see is that #65 distinguishes between Intl.Collator.options, Intl.Collator.resolvedOptions and Intl.Collator.supportedLocalesOptions.

Also see the discussion there starting with #65 (comment) (polymorphic variants vs. regular variants).

@@ -1,17 +1,27 @@
type t

type options = {
usage?: [#sort | #search],
localeMathcer?: [#lookup | #"best fit"],
Copy link
Member

Choose a reason for hiding this comment

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

Typo (occurs several times)

@glennsl
Copy link
Contributor Author

glennsl commented Feb 15, 2024

There is also #65 (a more encompassing Intl bindings PR). One difference I see is that #65 distinguishes between Intl.Collator.options, Intl.Collator.resolvedOptions and Intl.Collator.supportedLocalesOptions.

Also see the discussion there starting with #65 (comment) (polymorphic variants vs. regular variants).

Ah, I've missed that. That's so much better! This is mostly just a lazy copy of my own bindings with some additions to flesh it out. I'll just close this and comment over there then.

@glennsl glennsl closed this Feb 15, 2024
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.

3 participants