diff options
| author | Michał Cieślar <[email protected]> | 2024-10-10 17:57:27 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-10-10 17:57:27 +0200 |
| commit | 2f93d9da383638b6d232ff8b3cae827ea4c80150 (patch) | |
| tree | 4e966f3ad2382f93baa993af90e1a80b65af9052 /src/definitions | |
| parent | 17606589dd58151e43c037a3acfa82046b33e37c (diff) | |
| download | faker-2f93d9da383638b6d232ff8b3cae827ea4c80150.tar.xz faker-2f93d9da383638b6d232ff8b3cae827ea4c80150.zip | |
feat: add book module (#2949)
Diffstat (limited to 'src/definitions')
| -rw-r--r-- | src/definitions/book.ts | 36 | ||||
| -rw-r--r-- | src/definitions/definitions.ts | 2 | ||||
| -rw-r--r-- | src/definitions/index.ts | 1 |
3 files changed, 39 insertions, 0 deletions
diff --git a/src/definitions/book.ts b/src/definitions/book.ts new file mode 100644 index 00000000..c10e530c --- /dev/null +++ b/src/definitions/book.ts @@ -0,0 +1,36 @@ +import type { LocaleEntry } from './definitions'; + +/** + * The possible definitions related to books. + */ +export type BookDefinition = LocaleEntry<{ + /** + * The names of actual book authors. + */ + author: string[]; + + /** + * The formats of a book. + */ + format: string[]; + + /** + * The names of some book genres. + */ + genre: string[]; + + /** + * The names of actual book series. + */ + series: string[]; + + /** + * The names of actual book titles. + */ + title: string[]; + + /** + * The names of actual book publishers. + */ + publisher: string[]; +}>; diff --git a/src/definitions/definitions.ts b/src/definitions/definitions.ts index cf760f0b..d207ec12 100644 --- a/src/definitions/definitions.ts +++ b/src/definitions/definitions.ts @@ -1,5 +1,6 @@ import type { AirlineDefinition } from './airline'; import type { AnimalDefinition } from './animal'; +import type { BookDefinition } from './book'; import type { ColorDefinition } from './color'; import type { CommerceDefinition } from './commerce'; import type { CompanyDefinition } from './company'; @@ -34,6 +35,7 @@ export type LocaleDefinition = { metadata?: MetadataDefinition; airline?: AirlineDefinition; animal?: AnimalDefinition; + book?: BookDefinition; color?: ColorDefinition; commerce?: CommerceDefinition; company?: CompanyDefinition; diff --git a/src/definitions/index.ts b/src/definitions/index.ts index 367892b7..68ac0401 100644 --- a/src/definitions/index.ts +++ b/src/definitions/index.ts @@ -1,5 +1,6 @@ export type { AirlineDefinition } from './airline'; export type { AnimalDefinition } from './animal'; +export type { BookDefinition } from './book'; export type { ColorDefinition } from './color'; export type { CommerceDefinition, |
