-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathdefinitions.ts
More file actions
55 lines (53 loc) · 2.18 KB
/
definitions.ts
File metadata and controls
55 lines (53 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import type { AirlineDefinitions } from './airline';
import type { AnimalDefinitions } from './animal';
import type { ColorDefinitions } from './color';
import type { CommerceDefinitions } from './commerce';
import type { CompanyDefinitions } from './company';
import type { DatabaseDefinitions } from './database';
import type { DateDefinitions } from './date';
import type { FinanceDefinitions } from './finance';
import type { HackerDefinitions } from './hacker';
import type { InternetDefinitions } from './internet';
import type { LocationDefinitions } from './location';
import type { LoremDefinitions } from './lorem';
import type { MetadataDefinitions } from './metadata';
import type { MusicDefinitions } from './music';
import type { PersonDefinitions } from './person';
import type { PhoneNumberDefinitions } from './phone_number';
import type { ScienceDefinitions } from './science';
import type { SystemDefinitions } from './system';
import type { VehicleDefinitions } from './vehicle';
import type { WordDefinitions } from './word';
/**
* Wrapper type for all definition categories that will make all properties optional and allow extra properties.
*/
export type LocaleEntry<T extends Record<string, unknown>> = {
[P in keyof T]?: T[P] | null;
} & Record<string, unknown>; // Unsupported & custom entries
/**
* The definitions as used by the translations/locales.
* This is basically the same as Definitions with the exception,
* that most properties are optional and extra properties are allowed.
*/
export type LocaleDefinition = {
metadata?: MetadataDefinitions;
airline?: AirlineDefinitions;
animal?: AnimalDefinitions;
color?: ColorDefinitions;
commerce?: CommerceDefinitions;
company?: CompanyDefinitions;
database?: DatabaseDefinitions;
date?: DateDefinitions;
finance?: FinanceDefinitions;
hacker?: HackerDefinitions;
internet?: InternetDefinitions;
location?: LocationDefinitions;
lorem?: LoremDefinitions;
music?: MusicDefinitions;
person?: PersonDefinitions;
phone_number?: PhoneNumberDefinitions;
science?: ScienceDefinitions;
system?: SystemDefinitions;
vehicle?: VehicleDefinitions;
word?: WordDefinitions;
} & Record<string, Record<string, unknown>>;