Skip to content

chore(packages/spec): add precise types for locales.ts#580

Merged
mathio merged 5 commits intolingodotdev:mainfrom
TheRohit:enhance-locale-types-rm
Mar 26, 2025
Merged

chore(packages/spec): add precise types for locales.ts#580
mathio merged 5 commits intolingodotdev:mainfrom
TheRohit:enhance-locale-types-rm

Conversation

@TheRohit
Copy link
Copy Markdown
Contributor

fixes #560

};

export function normalizeLocale(locale: string) {
export function normalizeLocale(locale: string): string {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is not necessary since Typescript automatically infers simple types like this. But it also does not hurt to be explicit since the method is exported from the lib 🙃

@mathio
Copy link
Copy Markdown
Contributor

mathio commented Mar 26, 2025

Please resolve conflicts and we can merge this!

@mathio mathio merged commit 37f012b into lingodotdev:main Mar 26, 2025
2 checks passed
mainstar123 pushed a commit to mainstar123/lingo.dev that referenced this pull request Jul 7, 2025
17prateek12 pushed a commit to 17prateek12/lingo.dev that referenced this pull request Jan 23, 2026
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.

Spec Module (/packages/spec): Add more specific return types to locale utility functions

2 participants