实现板件倒角
This commit is contained in:
11
types/Common/Singleton.d.ts
vendored
11
types/Common/Singleton.d.ts
vendored
@@ -1,3 +1,12 @@
|
||||
export interface PrototypeType<T> extends Function {
|
||||
prototype: T;
|
||||
}
|
||||
export interface ConstructorFunctionType<T = any> extends PrototypeType<T> {
|
||||
new (...args: any[]): T;
|
||||
}
|
||||
export type ConstructorType<T = unknown, Static extends Record<string, any> = PrototypeType<T>> = (ConstructorFunctionType<T> | PrototypeType<T>) & {
|
||||
[Key in keyof Static]: Static[Key];
|
||||
};
|
||||
/**
|
||||
* 构造单例类的静态类.
|
||||
* # Example:
|
||||
@@ -7,6 +16,6 @@
|
||||
*/
|
||||
export declare class Singleton {
|
||||
protected constructor();
|
||||
static GetInstance<T = any>(): T;
|
||||
static GetInstance<T extends Singleton>(this: ConstructorType<T, typeof Singleton>): T;
|
||||
}
|
||||
//# sourceMappingURL=Singleton.d.ts.map
|
Reference in New Issue
Block a user