Skip to content

Commit 9bc62f1

Browse files
build(release): index.js & index.d.ts for 2.1.0
[skip ci]
1 parent a05dad6 commit 9bc62f1

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

index.d.ts

+8-4
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,19 @@ declare type Constructor<T> = new (...args: any[]) => T;
1313
declare type UnionToIntersection<Union> = (Union extends any ? (argument: Union) => void : never) extends (argument: infer Intersection) => void ? Intersection : never;
1414
declare type AnyFunction = (...args: any) => any;
1515
declare type ReturnTypeOf<T extends AnyFunction | AnyFunction[]> = T extends AnyFunction ? ReturnType<T> : T extends AnyFunction[] ? UnionToIntersection<ReturnType<T[number]>> : never;
16-
export declare class Base {
16+
export declare class Base<TOptions extends Options = Options> {
1717
static plugins: TestPlugin[];
1818
static plugin<S extends Constructor<any> & {
1919
plugins: any[];
2020
}, T1 extends TestPlugin, T2 extends TestPlugin[]>(this: S, plugin1: T1, ...additionalPlugins: T2): S & {
2121
plugins: any[];
2222
} & Constructor<UnionToIntersection<ReturnTypeOf<T1> & ReturnTypeOf<T2>>>;
23-
static defaults<S extends Constructor<any>>(this: S, defaults: Options): S;
24-
constructor(options?: Options);
25-
options: Options;
23+
static defaults<TDefaults extends Options, S extends Constructor<Base<TDefaults>>>(this: S, defaults: TDefaults): {
24+
new (...args: any[]): {
25+
options: TDefaults;
26+
};
27+
} & S;
28+
constructor(options?: TOptions);
29+
options: TOptions;
2630
}
2731
export {};

0 commit comments

Comments
 (0)