mdn/yari

[Suggestion] 'Locale' values would be better to be managed as a type.

C17AN opened this issue · 1 comments

Summary

The locale properties used in the project are of the string type, and it would be nice if they were managed more strictly with the Locale type.

  • AS-IS (Code Suggestion at on-github.tsx)
image
  • TO-BE
image

Anything else?

First of all, I think this could be a breaking change, so I started by fixing one small type.

If there is a reason for using the string type considering future scalability, etc., you can reject this PR. :)

Or If you think this proposal is okay, I'll fix the parts that are considered to have less impact to the Locale type.

Validations

Fixed via #11323.