create-rstack 1.0.9 → 1.2.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 CHANGED
@@ -20,19 +20,20 @@ export declare function checkCancel<T>(value: unknown): T;
20
20
  export declare function copyFolder({ from, to, version, packageName, isMergePackageJson, skipFiles, }: {
21
21
  from: string;
22
22
  to: string;
23
- version?: string;
23
+ version?: string | Record<string, string>;
24
24
  packageName?: string;
25
25
  isMergePackageJson?: boolean;
26
26
  skipFiles?: string[];
27
27
  }): void;
28
28
 
29
- export declare function create({ name, root, templates, skipFiles, getTemplateName, mapESLintTemplate, }: {
29
+ export declare function create({ name, root, templates, skipFiles, getTemplateName, mapESLintTemplate, version, }: {
30
30
  name: string;
31
31
  root: string;
32
32
  skipFiles?: string[];
33
33
  templates: string[];
34
34
  getTemplateName: (argv: Argv) => Promise<string>;
35
35
  mapESLintTemplate: (templateName: string) => ESLintTemplateName | null;
36
+ version?: Record<string, string> | string;
36
37
  }): Promise<void>;
37
38
 
38
39
  export declare type ESLintTemplateName = 'vanilla-js' | 'vanilla-ts' | 'react-js' | 'react-ts' | 'vue-ts' | 'vue-js' | 'svelte-js' | 'svelte-ts';
@@ -44,33 +45,60 @@ export declare type ESLintTemplateName = 'vanilla-js' | 'vanilla-ts' | 'react-js
44
45
  */
45
46
  export declare function mergePackageJson(targetPackage: string, extraPackage: string): void;
46
47
 
47
- export declare const multiselect: <Options extends Option_2<Value>[], Value>(opts: MultiSelectOptions<Options, Value>) => Promise<symbol | Value[]>;
48
+ export declare const multiselect: <Value>(opts: MultiSelectOptions<Value>) => Promise<symbol | Value[]>;
48
49
 
49
- declare interface MultiSelectOptions<Options extends Option_2<Value>[], Value> {
50
+ declare interface MultiSelectOptions<Value> {
50
51
  message: string;
51
- options: Options;
52
+ options: Option_2<Value>[];
52
53
  initialValues?: Value[];
54
+ maxItems?: number;
53
55
  required?: boolean;
54
56
  cursorAt?: Value;
55
57
  }
56
58
 
57
59
  declare type Option_2<Value> = Value extends Primitive ? {
60
+ /**
61
+ * Internal data for this option.
62
+ */
58
63
  value: Value;
64
+ /**
65
+ * The optional, user-facing text for this option.
66
+ *
67
+ * By default, the `value` is converted to a string.
68
+ */
59
69
  label?: string;
70
+ /**
71
+ * An optional hint to display to the user when
72
+ * this option might be selected.
73
+ *
74
+ * By default, no `hint` is displayed.
75
+ */
60
76
  hint?: string;
61
77
  } : {
78
+ /**
79
+ * Internal data for this option.
80
+ */
62
81
  value: Value;
82
+ /**
83
+ * Required. The user-facing text for this option.
84
+ */
63
85
  label: string;
86
+ /**
87
+ * An optional hint to display to the user when
88
+ * this option might be selected.
89
+ *
90
+ * By default, no `hint` is displayed.
91
+ */
64
92
  hint?: string;
65
93
  };
66
94
 
67
95
  declare type Primitive = Readonly<string | boolean | number>;
68
96
 
69
- export declare const select: <Options extends Option_2<Value>[], Value>(opts: SelectOptions<Options, Value>) => Promise<symbol | Value>;
97
+ export declare const select: <Value>(opts: SelectOptions<Value>) => Promise<symbol | Value>;
70
98
 
71
- declare interface SelectOptions<Options extends Option_2<Value>[], Value> {
99
+ declare interface SelectOptions<Value> {
72
100
  message: string;
73
- options: Options;
101
+ options: Option_2<Value>[];
74
102
  initialValue?: Value;
75
103
  maxItems?: number;
76
104
  }
@@ -82,7 +110,7 @@ declare interface TextOptions {
82
110
  placeholder?: string;
83
111
  defaultValue?: string;
84
112
  initialValue?: string;
85
- validate?: (value: string) => string | void;
113
+ validate?: (value: string) => string | Error | undefined;
86
114
  }
87
115
 
88
116
  export { }