Some functions in locales.ts could benefit from more precise TypeScript return types. For example:
// Current implementation
export const getLocaleCodeDelimiter = (locale: string): string | null => {
// ...
}
// Could be improved to
export const getLocaleCodeDelimiter = (locale: string): "-" | "_" | null => {
// ...
}
Some functions in
locales.tscould benefit from more precise TypeScript return types. For example: