Skip to content

Flip MF2 constructor args from (source, locales, options) to (locales, source, options)#423

Merged
eemeli merged 1 commit intomainfrom
flip-args
Jul 17, 2024
Merged

Flip MF2 constructor args from (source, locales, options) to (locales, source, options)#423
eemeli merged 1 commit intomainfrom
flip-args

Conversation

@eemeli
Copy link
Member

@eemeli eemeli commented Jul 17, 2024

This is a breaking change, following the spec change in tc39/proposal-intl-messageformat#62.

Note that as both arguments accept a string value, tooling such as TypeScript may not catch all the places where you'll need to change your code.

This also means that the constructor now has two required arguments, albeit the first one can be undefined.

@eemeli eemeli added the MF2 MessageFormat 2 label Jul 17, 2024
@eemeli eemeli merged commit 60db918 into main Jul 17, 2024
@eemeli eemeli deleted the flip-args branch July 17, 2024 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MF2 MessageFormat 2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant