improve
This commit is contained in:
6
packages/common/src/models/lang.ts
Normal file
6
packages/common/src/models/lang.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export const SUPPORTED_LANGS = ["fr", "en"];
|
||||
export type SupportedLangs = (typeof SUPPORTED_LANGS)[number];
|
||||
|
||||
export function isSupportedLang(obj: unknown): obj is SupportedLangs {
|
||||
return (SUPPORTED_LANGS as unknown[]).includes(obj);
|
||||
}
|
||||
Reference in New Issue
Block a user