-
-
Notifications
You must be signed in to change notification settings - Fork 949
/
Copy pathdefinitions.ts
58 lines (56 loc) · 1.89 KB
/
definitions.ts
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
56
57
58
import type { AddressDefinitions } from './address';
import type { AnimalDefinitions } from './animal';
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 { LoremDefinitions } from './lorem';
import type { MusicDefinitions } from './music';
import type { NameDefinitions } from './name';
import type { PhoneNumberDefinitions } from './phone_number';
import type { SystemDefinitions } from './system';
import type { VehicleDefinitions } from './vehicle';
import type { WordDefinitions } from './word';
/**
* The definitions as used by the Faker modules.
*/
interface Definitions {
address: AddressDefinitions;
animal: AnimalDefinitions;
commerce: CommerceDefinitions;
company: CompanyDefinitions;
database: DatabaseDefinitions;
date: DateDefinitions;
finance: FinanceDefinitions;
hacker: HackerDefinitions;
internet: InternetDefinitions;
lorem: LoremDefinitions;
music: MusicDefinitions;
name: NameDefinitions;
phone_number: PhoneNumberDefinitions;
system: SystemDefinitions;
vehicle: VehicleDefinitions;
word: WordDefinitions;
}
/**
* 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 = {
/**
* The name of the language.
*/
title: string;
separator?: string;
} & {
// Known modules
[module in keyof Definitions]?: Partial<Definitions[module]>;
} & {
// Unsupported & custom modules
// eslint-disable-next-line @typescript-eslint/no-explicit-any
[group: string]: any;
};