@clerc/parser 1.0.0-beta.13 → 1.0.0-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -28,7 +28,9 @@ type IsAny<T> = 0 extends 1 & T ? true : false;
28
28
  type MaybeArray<T> = T | T[];
29
29
  //#endregion
30
30
  //#region src/types.d.ts
31
- type FlagDefaultValue<T = unknown> = T | (() => T);
31
+ type FlagDefaultValue<T = unknown> = T | ((() => T) & {
32
+ display?: string;
33
+ });
32
34
  /**
33
35
  * Defines how a string input is converted to the target type T.
34
36
  *
@@ -39,7 +41,7 @@ type FlagTypeFunction<T = unknown> = ((value: string) => T) & {
39
41
  * Optional display name for the type, useful in help output.
40
42
  * If provided, this will be shown instead of the function name.
41
43
  */
42
- displayName?: string;
44
+ display?: string;
43
45
  };
44
46
  /**
45
47
  * A callback function to conditionally stop parsing.
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ function Choices(...values) {
27
27
  if (!values.includes(value)) throw new Error(`Invalid value: ${value}. Must be one of: ${values.join(", ")}`);
28
28
  return value;
29
29
  });
30
- fn.displayName = values.join(" | ");
30
+ fn.display = values.join(" | ");
31
31
  return fn;
32
32
  }
33
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clerc/parser",
3
- "version": "1.0.0-beta.13",
3
+ "version": "1.0.0-beta.14",
4
4
  "author": "Ray <i@mk1.io> (https://github.com/so1ve)",
5
5
  "type": "module",
6
6
  "description": "Clerc parser",
@@ -56,6 +56,6 @@
56
56
  "nopt": "^9.0.0",
57
57
  "type-flag": "^4.0.3",
58
58
  "yargs-parser": "^22.0.0",
59
- "@clerc/utils": "1.0.0-beta.13"
59
+ "@clerc/utils": "1.0.0-beta.14"
60
60
  }
61
61
  }