aboutsummaryrefslogtreecommitdiff
path: root/src/modules/system
diff options
context:
space:
mode:
authorShinigami <[email protected]>2023-01-18 21:01:58 +0100
committerGitHub <[email protected]>2023-01-18 21:01:58 +0100
commit250fbb71eb68aa469b6b833a61a4d23fb60ad65d (patch)
tree0a5d282f61852a5eb94b118bafba175d4f81a824 /src/modules/system
parent0ac998992c87f9bfd5c1fae3c59ca6b79ef5b4b9 (diff)
downloadfaker-250fbb71eb68aa469b6b833a61a4d23fb60ad65d.tar.xz
faker-250fbb71eb68aa469b6b833a61a4d23fb60ad65d.zip
docs: jsdoc for options (#1644)
Diffstat (limited to 'src/modules/system')
-rw-r--r--src/modules/system/index.ts37
1 files changed, 35 insertions, 2 deletions
diff --git a/src/modules/system/index.ts b/src/modules/system/index.ts
index e5413622..2f3ce371 100644
--- a/src/modules/system/index.ts
+++ b/src/modules/system/index.ts
@@ -63,9 +63,22 @@ export class SystemModule {
fileName(
options: {
/**
- * Define how many extensions the file name should have. Defaults to `1`.
+ * Define how many extensions the file name should have.
+ *
+ * @default 1
*/
- extensionCount?: number | { min: number; max: number };
+ extensionCount?:
+ | number
+ | {
+ /**
+ * Minimum number of extensions.
+ */
+ min: number;
+ /**
+ * Maximum number of extensions.
+ */
+ max: number;
+ };
} = {}
): string {
const { extensionCount = 1 } = options;
@@ -250,7 +263,17 @@ export class SystemModule {
*/
networkInterface(
options: {
+ /**
+ * The interface type. Can be one of `en`, `wl`, `ww`.
+ *
+ * @default faker.helpers.arrayElement(['en', 'wl', 'ww'])
+ */
interfaceType?: (typeof commonInterfaceTypes)[number];
+ /**
+ * The interface schema. Can be one of `index`, `slot`, `mac`, `pci`.
+ *
+ * @default faker.helpers.objectKey(['index' | 'slot' | 'mac' | 'pci'])
+ */
interfaceSchema?: keyof typeof commonInterfaceSchemas;
} = {}
): string {
@@ -303,7 +326,17 @@ export class SystemModule {
*/
cron(
options: {
+ /**
+ * Whether to include a year in the generated expression.
+ *
+ * @default false
+ */
includeYear?: boolean;
+ /**
+ * Whether to include a @yearly, @monthly, @daily, etc text labels in the generated expression.
+ *
+ * @default false
+ */
includeNonStandard?: boolean;
} = {}
): string {