blob: e2c25824e63b4bb9bc315332a26e9454fb5a00fc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import type Locale from '$types/Locale';
// Use the magic of TypeScript to guarantee completeness
const localesHash: { [key in Locale]: 1 } = {
sco: 1,
'en-GB': 1,
};
// Use the magic of TypeScript to guarantee that the
// default locale is a locale, but also have const
// string type
const defaultLocaleAsLocale: Locale = 'sco';
const defaultLocale: 'sco' = defaultLocaleAsLocale;
export { defaultLocale };
export default Object.keys(localesHash) as Locale[];
|