@@ -6,13 +6,16 @@ import { barPlugin } from "./plugins/bar/index.js";
6
6
import { voidPlugin } from "./plugins/void/index.js" ;
7
7
import { withOptionsPlugin } from "./plugins/with-options" ;
8
8
9
- const base = new Base ( ) ;
9
+ const base = new Base ( {
10
+ version : "1.2.3" ,
11
+ } ) ;
10
12
11
13
// @ts -expect-error unknown properties cannot be used, see #31
12
14
base . unknown ;
13
15
14
16
const FooBase = Base . plugin ( fooPlugin ) . defaults ( {
15
17
default : "value" ,
18
+ version : "1.2.3" ,
16
19
} ) ;
17
20
const fooBase = new FooBase ( {
18
21
option : "value" ,
@@ -23,13 +26,17 @@ expectType<string>(fooBase.options.option);
23
26
expectType < string > ( fooBase . foo ) ;
24
27
25
28
const BaseWithVoidPlugin = Base . plugin ( voidPlugin ) ;
26
- const baseWithVoidPlugin = new BaseWithVoidPlugin ( ) ;
29
+ const baseWithVoidPlugin = new BaseWithVoidPlugin ( {
30
+ version : "1.2.3" ,
31
+ } ) ;
27
32
28
33
// @ts -expect-error unknown properties cannot be used, see #31
29
34
baseWithVoidPlugin . unknown ;
30
35
31
36
const BaseWithFooAndBarPlugins = Base . plugin ( barPlugin , fooPlugin ) ;
32
- const baseWithFooAndBarPlugins = new BaseWithFooAndBarPlugins ( ) ;
37
+ const baseWithFooAndBarPlugins = new BaseWithFooAndBarPlugins ( {
38
+ version : "1.2.3" ,
39
+ } ) ;
33
40
34
41
expectType < string > ( baseWithFooAndBarPlugins . foo ) ;
35
42
expectType < string > ( baseWithFooAndBarPlugins . bar ) ;
@@ -42,7 +49,9 @@ const BaseWithVoidAndNonVoidPlugins = Base.plugin(
42
49
voidPlugin ,
43
50
fooPlugin
44
51
) ;
45
- const baseWithVoidAndNonVoidPlugins = new BaseWithVoidAndNonVoidPlugins ( ) ;
52
+ const baseWithVoidAndNonVoidPlugins = new BaseWithVoidAndNonVoidPlugins ( {
53
+ version : "1.2.3" ,
54
+ } ) ;
46
55
47
56
expectType < string > ( baseWithVoidAndNonVoidPlugins . foo ) ;
48
57
expectType < string > ( baseWithVoidAndNonVoidPlugins . bar ) ;
0 commit comments