@clerc/utils 0.22.1 → 0.24.0
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 +3 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ type Primitive = null | undefined | string | number | boolean | symbol | bigint;
|
|
|
9
9
|
* Copied from type-fest
|
|
10
10
|
*/
|
|
11
11
|
type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
|
|
12
|
+
type Equals<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
|
|
12
13
|
type Dict<T> = Record<string, T>;
|
|
13
14
|
type ToArray<T> = T extends any[] ? T : [T];
|
|
14
15
|
type MaybeArray<T> = T | T[];
|
|
@@ -27,7 +28,7 @@ declare const gracefulFlagName: (n: string) => string;
|
|
|
27
28
|
declare const gracefulVersion: (v: string) => string;
|
|
28
29
|
declare const arrayEquals: <T>(arr1: T[], arr2: T[]) => boolean;
|
|
29
30
|
declare const arrayStartsWith: <T>(arr: T[], start: T[]) => boolean;
|
|
30
|
-
declare const generateCommandRecordFromCommandArray: <C extends Command<string, _clerc_core.CommandOptions<string[], MaybeArray<string | typeof _clerc_core.Root>,
|
|
31
|
+
declare const generateCommandRecordFromCommandArray: <C extends Command<string, _clerc_core.CommandOptions<string[], MaybeArray<string | typeof _clerc_core.Root>, _clerc_core.Flags>>>(commands: C[]) => Dict<C>;
|
|
31
32
|
declare const semanticArray: (arr: string[]) => string;
|
|
32
33
|
|
|
33
|
-
export { CamelCase, Dict, Enhance, GetLength, GetTail, KebabCase, LiteralUnion, MaybeArray, Primitive, ToArray, arrayEquals, arrayStartsWith, camelCase, generateCommandRecordFromCommandArray, gracefulFlagName, gracefulVersion, kebabCase, semanticArray, toArray };
|
|
34
|
+
export { CamelCase, Dict, Enhance, Equals, GetLength, GetTail, KebabCase, LiteralUnion, MaybeArray, Primitive, ToArray, arrayEquals, arrayStartsWith, camelCase, generateCommandRecordFromCommandArray, gracefulFlagName, gracefulVersion, kebabCase, semanticArray, toArray };
|