@@ -15,36 +15,19 @@ declare type AnyFunction = (...args: any) => any;
1515declare type ReturnTypeOf < T extends AnyFunction | AnyFunction [ ] > = T extends AnyFunction ? ReturnType < T > : T extends AnyFunction [ ] ? UnionToIntersection < ReturnType < T [ number ] > > : never ;
1616export declare class Base {
1717 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 ;
2123 } ;
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 ;
3129 } ;
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 ;
4831 constructor ( options ?: Options ) ;
4932 options : Options ;
5033}
0 commit comments