File tree 1 file changed +14
-9
lines changed
1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -30,9 +30,16 @@ interface OnPromptCompleteCb<T> {
30
30
options : {
31
31
useConfigFiles : boolean
32
32
plugins : Record < string , any >
33
- } ,
33
+ }
34
34
) : void
35
35
}
36
+ type ExtendPackageOptions =
37
+ | {
38
+ prune ?: boolean
39
+ merge ?: boolean
40
+ warnIncompatibleVersions ?: boolean
41
+ }
42
+ | boolean
36
43
37
44
type Preset = Partial < {
38
45
[ props : string ] : any
@@ -116,14 +123,12 @@ declare class GeneratorAPI {
116
123
* if two dependency version ranges don't intersect.
117
124
*/
118
125
extendPackage (
119
- fields : object | ( ( pkg : Record < string , any > ) => object ) ,
120
- options ?:
121
- | {
122
- prune ?: boolean
123
- merge ?: boolean
124
- warnIncompatibleVersions ?: boolean
125
- }
126
- | boolean ,
126
+ fields : ( pkg : Record < string , any > ) => object ,
127
+ options ?: ExtendPackageOptions
128
+ ) : void
129
+ extendPackage < T extends object > (
130
+ fields : T extends Function ? never : T ,
131
+ options ?: ExtendPackageOptions
127
132
) : void
128
133
129
134
/**
You can’t perform that action at this time.
0 commit comments