diff options
| author | ST-DDT <[email protected]> | 2022-02-01 17:31:52 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-02-01 17:31:52 +0100 |
| commit | 5e6754da61b63019fd063fad26adbeeabd8b789b (patch) | |
| tree | 954f7730feba92d951f66862d9165b99645f8981 /src/definitions/system.ts | |
| parent | 18b4349af05ca671f1fc4cff0c04d359e914f001 (diff) | |
| download | faker-5e6754da61b63019fd063fad26adbeeabd8b789b.tar.xz faker-5e6754da61b63019fd063fad26adbeeabd8b789b.zip | |
feat(types): provide strong typing for locales (#363)
Diffstat (limited to 'src/definitions/system.ts')
| -rw-r--r-- | src/definitions/system.ts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/definitions/system.ts b/src/definitions/system.ts new file mode 100644 index 00000000..5c9039b4 --- /dev/null +++ b/src/definitions/system.ts @@ -0,0 +1,33 @@ +import { allOf } from './utils'; + +/** + * The possible definitions related to files and the system. + */ +export interface SystemDefinitions { + /** + * Returns some common file paths. + */ + directoryPaths: string[]; + /** + * The mime type definitions with some additional information. + */ + mimeTypes: { [mimeType: string]: SystemMimeTypeEntryDefinitions }; +} + +/** + * The mime type entry details. + */ +export interface SystemMimeTypeEntryDefinitions { + source?: string; + extensions?: string[]; + compressible?: boolean; + charset?: string; +} + +/** + * Internal: A list of all keys for the SystemDefinitions. + */ +export const SYSTEM = allOf<keyof SystemDefinitions>()( + 'directoryPaths', + 'mimeTypes' +); |
