@reliverse/rempts 1.7.27 → 1.7.28
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.
|
@@ -11,6 +11,7 @@ export type BaseArgDefinition = {
|
|
|
11
11
|
default?: any;
|
|
12
12
|
allowed?: any[];
|
|
13
13
|
dependencies?: string[];
|
|
14
|
+
useTsType?: unknown;
|
|
14
15
|
};
|
|
15
16
|
export type PositionalArgDefinition = BaseArgDefinition & {
|
|
16
17
|
type: "positional";
|
|
@@ -138,7 +139,9 @@ export type Command<A extends ArgDefinitions = EmptyArgs> = {
|
|
|
138
139
|
onLauncherExit?: () => void | Promise<void>;
|
|
139
140
|
};
|
|
140
141
|
export type InferArgTypes<A extends ArgDefinitions> = {
|
|
141
|
-
[K in keyof A]: A[K] extends
|
|
142
|
+
[K in keyof A]: A[K] extends {
|
|
143
|
+
useTsType: infer T;
|
|
144
|
+
} ? T : A[K] extends PositionalArgDefinition ? string : A[K] extends BooleanArgDefinition ? boolean : A[K] extends StringArgDefinition ? string : A[K] extends NumberArgDefinition ? number : A[K] extends {
|
|
142
145
|
type: "array";
|
|
143
146
|
} ? string[] : never;
|
|
144
147
|
};
|