@@ -15,36 +15,19 @@ declare type AnyFunction = (...args: any) => any;
15
15
declare type ReturnTypeOf < T extends AnyFunction | AnyFunction [ ] > = T extends AnyFunction ? ReturnType < T > : T extends AnyFunction [ ] ? UnionToIntersection < ReturnType < T [ number ] > > : never ;
16
16
export declare class Base {
17
17
static plugins : TestPlugin [ ] ;
18
- static plugin < T extends TestPlugin | TestPlugin [ ] > ( plugin : T ) : {
19
- new ( options ?: Options ) : {
20
- options : Options ;
18
+ static plugin < S extends Constructor < any > & {
19
+ plugins : any [ ] ;
20
+ } , T extends TestPlugin | TestPlugin [ ] > ( this : S , plugin : T ) : {
21
+ new ( ...args : any [ ] ) : {
22
+ [ x : string ] : any ;
21
23
} ;
22
- plugins : TestPlugin [ ] ;
23
- plugin < T_1 extends TestPlugin | TestPlugin [ ] > ( plugin : T ) : any & Constructor < ReturnTypeOf < T > > ;
24
- defaults ( defaults : Options ) : {
25
- new ( options ?: Options ) : {
26
- options : Options ;
27
- } ;
28
- plugins : TestPlugin [ ] ;
29
- plugin < T_1 extends TestPlugin | TestPlugin [ ] > ( plugin : T ) : any & Constructor < ReturnTypeOf < T > > ;
30
- defaults ( defaults : Options ) : any ;
24
+ plugins : any [ ] ;
25
+ } & S & Constructor < ReturnTypeOf < T > > ;
26
+ static defaults < S extends Constructor < any > > ( this : S , defaults : Options ) : {
27
+ new ( ...args : any [ ] ) : {
28
+ [ x : string ] : any ;
31
29
} ;
32
- } & Constructor < ReturnTypeOf < T > > ;
33
- static defaults ( defaults : Options ) : {
34
- new ( options ?: Options ) : {
35
- options : Options ;
36
- } ;
37
- plugins : TestPlugin [ ] ;
38
- plugin < T extends TestPlugin | TestPlugin [ ] > ( plugin : T ) : {
39
- new ( options ?: Options ) : {
40
- options : Options ;
41
- } ;
42
- plugins : TestPlugin [ ] ;
43
- plugin < T extends TestPlugin | TestPlugin [ ] > ( plugin : T ) : any & Constructor < ReturnTypeOf < T > > ;
44
- defaults ( defaults : Options ) : any ;
45
- } & Constructor < ReturnTypeOf < T > > ;
46
- defaults ( defaults : Options ) : any ;
47
- } ;
30
+ } & S ;
48
31
constructor ( options ?: Options ) ;
49
32
options : Options ;
50
33
}
0 commit comments