@@ -5,13 +5,16 @@ import { fooPlugin } from "./plugins/foo/index.js";
55import { barPlugin } from "./plugins/bar/index.js" ;
66import { voidPlugin } from "./plugins/void/index.js" ;
77
8- const base = new Base ( ) ;
8+ const base = new Base ( {
9+ version : "1.2.3" ,
10+ } ) ;
911
1012// @ts -expect-error unknown properties cannot be used, see #31
1113base . unknown ;
1214
1315const FooBase = Base . plugin ( fooPlugin ) . defaults ( {
1416 default : "value" ,
17+ version : "1.2.3" ,
1518} ) ;
1619const fooBase = new FooBase ( {
1720 option : "value" ,
@@ -22,13 +25,17 @@ expectType<string>(fooBase.options.option);
2225expectType < string > ( fooBase . foo ) ;
2326
2427const BaseWithVoidPlugin = Base . plugin ( voidPlugin ) ;
25- const baseWithVoidPlugin = new BaseWithVoidPlugin ( ) ;
28+ const baseWithVoidPlugin = new BaseWithVoidPlugin ( {
29+ version : "1.2.3" ,
30+ } ) ;
2631
2732// @ts -expect-error unknown properties cannot be used, see #31
2833baseWithVoidPlugin . unknown ;
2934
3035const BaseWithFooAndBarPlugins = Base . plugin ( barPlugin , fooPlugin ) ;
31- const baseWithFooAndBarPlugins = new BaseWithFooAndBarPlugins ( ) ;
36+ const baseWithFooAndBarPlugins = new BaseWithFooAndBarPlugins ( {
37+ version : "1.2.3" ,
38+ } ) ;
3239
3340expectType < string > ( baseWithFooAndBarPlugins . foo ) ;
3441expectType < string > ( baseWithFooAndBarPlugins . bar ) ;
@@ -41,7 +48,9 @@ const BaseWithVoidAndNonVoidPlugins = Base.plugin(
4148 voidPlugin ,
4249 fooPlugin
4350) ;
44- const baseWithVoidAndNonVoidPlugins = new BaseWithVoidAndNonVoidPlugins ( ) ;
51+ const baseWithVoidAndNonVoidPlugins = new BaseWithVoidAndNonVoidPlugins ( {
52+ version : "1.2.3" ,
53+ } ) ;
4554
4655expectType < string > ( baseWithVoidAndNonVoidPlugins . foo ) ;
4756expectType < string > ( baseWithVoidAndNonVoidPlugins . bar ) ;
0 commit comments