a-js-tools 0.4.0 → 0.5.0

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/README.md CHANGED
@@ -20,6 +20,7 @@ npm install a-js-tools --save
20
20
  - `autoEscapedRegExp` 生成简单的正则表达式
21
21
  - `isBrowser` 是否为浏览器环境
22
22
  - `isNode` 是否为 Node 环境
23
+ - `createConstructor` 构造构造函数
23
24
 
24
25
  ## class 名称转化
25
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "type": "module",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "name": "a-js-tools",
5
5
  "description": "一点点 🤏 js 函数",
6
6
  "license": "ISC",
@@ -0,0 +1,10 @@
1
+ interface CreateConstructor<T> {
2
+ new (): T;
3
+ }
4
+ /**
5
+ *
6
+ * 构建一个 Constructor 构造函数
7
+ *
8
+ */
9
+ export declare function createConstructor<T>(constructor: (...argumentList: unknown[]) => T): CreateConstructor<T>;
10
+ export {};