a-js-tools 0.5.1 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "type": "module",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "name": "a-js-tools",
5
5
  "description": "一点点 🤏 js 函数",
6
6
  "license": "ISC",
package/types/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export type { DebounceAndThrottleReturnType } from './src/performance';
4
4
  export { escapeRegExp, autoEscapedRegExp } from './src/regexp';
5
5
  export { isBrowser, isNode } from './src/isNode';
6
6
  export { createConstructor } from './src/createConstructor';
7
+ export type { CreateConstructor } from './src/createConstructor';
@@ -1,10 +1,14 @@
1
- interface CreateConstructor<T> {
2
- new (): T;
1
+ /**
2
+ *
3
+ * 构建构建的构建函数
4
+ *
5
+ */
6
+ export interface CreateConstructor<T, Args extends unknown[] = unknown[]> {
7
+ new (...args: Args): T;
3
8
  }
4
9
  /**
5
10
  *
6
11
  * 构建一个 Constructor 构造函数
7
12
  *
8
13
  */
9
- export declare function createConstructor<T>(constructor: (...argumentList: unknown[]) => T): CreateConstructor<T>;
10
- export {};
14
+ export declare function createConstructor<T, Args extends unknown[] = unknown[]>(constructor: (...argumentList: Args) => T): CreateConstructor<T, Args>;