diff --git a/src/types/index.d.ts b/src/types/index.d.ts new file mode 100644 index 0000000..c75d212 --- /dev/null +++ b/src/types/index.d.ts @@ -0,0 +1,6 @@ +// 全局构造函数类型 +declare type Constructor = new (...args: any[]) => T; + +// 通用回调类型 +declare type Callback = () => T; +declare type Callback1 = (arg: T) => R;