@splicetree/core 0.2.0 → 0.3.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/dist/index.d.ts +5 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,10 @@
|
|
|
5
5
|
* - 若传入 `D`,表示函数可选择性接收该参数类型
|
|
6
6
|
*/
|
|
7
7
|
type Fn<T, D = undefined> = [D] extends [undefined] ? () => T : (data?: D) => T;
|
|
8
|
+
/** 可能是数组的类型 */
|
|
9
|
+
type MaybeArray<T> = T | T[];
|
|
10
|
+
/** 可能是函数的类型 */
|
|
11
|
+
type MaybeFn<T, Args extends any[] = []> = T | ((...args: Args) => T);
|
|
8
12
|
/**
|
|
9
13
|
* 输入数据的通用结构
|
|
10
14
|
* - 表示原始树数据的任意键值对对象
|
|
@@ -279,4 +283,4 @@ type CreateSpliceTree = <T = SpliceTreeData>(data: T[], options?: UseSpliceTreeO
|
|
|
279
283
|
*/
|
|
280
284
|
declare function createSpliceTree<T extends SpliceTreeData = SpliceTreeData>(data: T[], options?: UseSpliceTreeOptions<T>): SpliceTreeInstance<T>;
|
|
281
285
|
//#endregion
|
|
282
|
-
export { CreateSpliceTree, Fn, SpliceTreeConfiguration, SpliceTreeData, SpliceTreeEventName, SpliceTreeEventPayload, SpliceTreeEventPayloadMap, SpliceTreeEvents, SpliceTreeInstance, SpliceTreeNode, SpliceTreePlugin, SpliceTreePluginContext, UseSpliceTreeOptions, createSpliceTree };
|
|
286
|
+
export { CreateSpliceTree, Fn, MaybeArray, MaybeFn, SpliceTreeConfiguration, SpliceTreeData, SpliceTreeEventName, SpliceTreeEventPayload, SpliceTreeEventPayloadMap, SpliceTreeEvents, SpliceTreeInstance, SpliceTreeNode, SpliceTreePlugin, SpliceTreePluginContext, UseSpliceTreeOptions, createSpliceTree };
|