Skip to content

Commit

Permalink
Fix missing ysdk typing
Browse files Browse the repository at this point in the history
  • Loading branch information
koteelok committed Sep 28, 2024
1 parent 80764de commit a835404
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions static/assets/common/localization.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { TopLevelDomain } from "ysdk";

export const LanguageCode = {
AF: "af",
AM: "am",
Expand Down Expand Up @@ -393,8 +391,6 @@ const TLD2LangCodeMap = {
tm: "tk",
ua: "uk",
uz: "uz",
} as const;
} as Record<string, string>;

export const domainToLanguageCode = <T extends TopLevelDomain>(
domain: T
): (typeof TLD2LangCodeMap)[T] => TLD2LangCodeMap[domain];
export const domainToLanguageCode = (domain: string): string => TLD2LangCodeMap[domain] ?? "en";

0 comments on commit a835404

Please sign in to comment.