@@ -19,13 +19,13 @@ const BaseWithEmptyDefaults = Base.defaults({
1919
2020// 'version' is missing and should still be required
2121// @ts -expect-error
22- new BaseWithEmptyDefaults ( )
22+ new BaseWithEmptyDefaults ( ) ;
2323
2424// 'version' is missing and should still be required
2525// @ts -expect-error
26- new BaseWithEmptyDefaults ( { } )
26+ new BaseWithEmptyDefaults ( { } ) ;
2727
28- const BaseLevelOne = Base . plugin ( fooPlugin ) . defaults ( {
28+ const BaseLevelOne = Base . plugin ( [ fooPlugin ] ) . defaults ( {
2929 defaultOne : "value" ,
3030 version : "1.2.3" ,
3131} ) ;
@@ -35,8 +35,8 @@ new BaseLevelOne();
3535new BaseLevelOne ( { } ) ;
3636
3737expectType < {
38- defaultOne : string ,
39- version : string ,
38+ defaultOne : string ;
39+ version : string ;
4040} > ( BaseLevelOne . defaultOptions ) ;
4141
4242const baseLevelOne = new BaseLevelOne ( {
@@ -54,9 +54,9 @@ const BaseLevelTwo = BaseLevelOne.defaults({
5454} ) ;
5555
5656expectType < {
57- defaultOne : string ,
58- defaultTwo : number ,
59- version : string ,
57+ defaultOne : string ;
58+ defaultTwo : number ;
59+ version : string ;
6060} > ( { ...BaseLevelTwo . defaultOptions } ) ;
6161
6262// Because 'version' is already provided, this needs no argument
@@ -65,11 +65,11 @@ new BaseLevelTwo({});
6565
6666// 'version' may be overriden, though it's not necessary
6767new BaseLevelTwo ( {
68- version : ' new version' ,
68+ version : " new version" ,
6969} ) ;
7070
7171const baseLevelTwo = new BaseLevelTwo ( {
72- optionTwo : true
72+ optionTwo : true ,
7373} ) ;
7474
7575expectType < number > ( baseLevelTwo . options . defaultTwo ) ;
@@ -80,14 +80,14 @@ expectType<string>(baseLevelTwo.options.version);
8080baseLevelTwo . unknown ;
8181
8282const BaseLevelThree = BaseLevelTwo . defaults ( {
83- defaultThree : [ 'a' , 'b' , 'c' ] ,
83+ defaultThree : [ "a" , "b" , "c" ] ,
8484} ) ;
8585
8686expectType < {
87- defaultOne : string ,
88- defaultTwo : number ,
89- defaultThree : string [ ] ,
90- version : string ,
87+ defaultOne : string ;
88+ defaultTwo : number ;
89+ defaultThree : string [ ] ;
90+ version : string ;
9191} > ( { ...BaseLevelThree . defaultOptions } ) ;
9292
9393// Because 'version' is already provided, this needs no argument
@@ -96,13 +96,13 @@ new BaseLevelThree({});
9696
9797// Previous settings may be overriden, though it's not necessary
9898new BaseLevelThree ( {
99- optionOne : '' ,
99+ optionOne : "" ,
100100 optionTwo : false ,
101- version : ' new version' ,
101+ version : " new version" ,
102102} ) ;
103103
104104const baseLevelThree = new BaseLevelThree ( {
105- optionThree : [ 0 , 1 , 2 ]
105+ optionThree : [ 0 , 1 , 2 ] ,
106106} ) ;
107107
108108expectType < string > ( baseLevelThree . options . defaultOne ) ;
@@ -113,15 +113,15 @@ expectType<string>(baseLevelThree.options.version);
113113// @ts -expect-error unknown properties cannot be used, see #31
114114baseLevelThree . unknown ;
115115
116- const BaseWithVoidPlugin = Base . plugin ( voidPlugin ) ;
116+ const BaseWithVoidPlugin = Base . plugin ( [ voidPlugin ] ) ;
117117const baseWithVoidPlugin = new BaseWithVoidPlugin ( {
118118 version : "1.2.3" ,
119119} ) ;
120120
121121// @ts -expect-error unknown properties cannot be used, see #31
122122baseWithVoidPlugin . unknown ;
123123
124- const BaseWithFooAndBarPlugins = Base . plugin ( barPlugin , fooPlugin ) ;
124+ const BaseWithFooAndBarPlugins = Base . plugin ( [ barPlugin , fooPlugin ] ) ;
125125const baseWithFooAndBarPlugins = new BaseWithFooAndBarPlugins ( {
126126 version : "1.2.3" ,
127127} ) ;
@@ -132,11 +132,11 @@ expectType<string>(baseWithFooAndBarPlugins.bar);
132132// @ts -expect-error unknown properties cannot be used, see #31
133133baseWithFooAndBarPlugins . unknown ;
134134
135- const BaseWithVoidAndNonVoidPlugins = Base . plugin (
135+ const BaseWithVoidAndNonVoidPlugins = Base . plugin ( [
136136 barPlugin ,
137137 voidPlugin ,
138- fooPlugin
139- ) ;
138+ fooPlugin ,
139+ ] ) ;
140140const baseWithVoidAndNonVoidPlugins = new BaseWithVoidAndNonVoidPlugins ( {
141141 version : "1.2.3" ,
142142} ) ;
@@ -147,7 +147,7 @@ expectType<string>(baseWithVoidAndNonVoidPlugins.bar);
147147// @ts -expect-error unknown properties cannot be used, see #31
148148baseWithVoidAndNonVoidPlugins . unknown ;
149149
150- const BaseWithOptionsPlugin = Base . plugin ( withOptionsPlugin ) ;
150+ const BaseWithOptionsPlugin = Base . plugin ( [ withOptionsPlugin ] ) ;
151151const baseWithOptionsPlugin = new BaseWithOptionsPlugin ( {
152152 version : "1.2.3" ,
153153} ) ;
@@ -185,30 +185,30 @@ expectType<{
185185 // @ts -expect-error - .options from .defaults() is only supported until a depth of 4
186186} > ( { ...baseLevelFour . options } ) ;
187187
188- const BaseWithChainedDefaultsAndPlugins = Base
189- . defaults ( {
190- defaultOne : "value" ,
191- } )
192- . plugin ( fooPlugin )
188+ const BaseWithChainedDefaultsAndPlugins = Base . defaults ( {
189+ defaultOne : "value" ,
190+ } )
191+ . plugin ( [ fooPlugin ] )
193192 . defaults ( {
194193 defaultTwo : 0 ,
195194 } ) ;
196195
197- const baseWithChainedDefaultsAndPlugins =
198- new BaseWithChainedDefaultsAndPlugins ( {
196+ const baseWithChainedDefaultsAndPlugins = new BaseWithChainedDefaultsAndPlugins (
197+ {
199198 version : "1.2.3" ,
200- } ) ;
199+ }
200+ ) ;
201201
202202expectType < string > ( baseWithChainedDefaultsAndPlugins . foo ) ;
203203
204204const BaseWithManyChainedDefaultsAndPlugins = Base . defaults ( {
205205 defaultOne : "value" ,
206206} )
207- . plugin ( fooPlugin , barPlugin , voidPlugin )
207+ . plugin ( [ fooPlugin , barPlugin , voidPlugin ] )
208208 . defaults ( {
209209 defaultTwo : 0 ,
210210 } )
211- . plugin ( withOptionsPlugin )
211+ . plugin ( [ withOptionsPlugin ] )
212212 . defaults ( {
213213 defaultThree : [ "a" , "b" , "c" ] ,
214214 } ) ;
0 commit comments