@flowlist/js-core 3.0.9 → 3.0.11

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
@@ -27,60 +27,243 @@ yarn add @flowlist/js-core
27
27
 
28
28
  ## 📦 Usage
29
29
 
30
- ```ts
31
- import flow from '@flowlist/js-core'
30
+ ### updateState 函数的正确使用方法
32
31
 
33
- // Example with a hypothetical state management system (e.g., React useState, Zustand, etc.)
34
- const { getter, setter, api, cache } = yourAppStateManager
32
+ #### 问题说明
35
33
 
36
- // 1. Initialize the data container
37
- await flow.initState({
34
+ 之前的版本中,`updateState` 函数的类型定义不够灵活,导致在传递自定义数据类型时出现类型错误。
35
+
36
+ #### 解决方案
37
+
38
+ 现在 `updateState` 函数支持泛型参数,可以正确处理各种数据类型。
39
+
40
+ #### 基本用法
41
+
42
+ ##### 1. 不使用泛型(默认行为)
43
+
44
+ ```typescript
45
+ import { updateState, ENUM } from '@flowlist/js-core'
46
+
47
+ // 使用默认的 KeyMap 类型
48
+ updateState({
38
49
  getter,
39
50
  setter,
40
- func: 'fetchPosts',
41
- type: 'page', // or 'sinceId', 'seenIds', 'auto', etc.
42
- query: { userId: 123 }
51
+ func: 'getMessages',
52
+ type: ENUM.FETCH_TYPE.AUTO,
53
+ method: ENUM.CHANGE_TYPE.RESULT_ITEM_MERGE,
54
+ id: msg.clientMsgId,
55
+ uniqueKey: 'clientMsgId',
56
+ value: {
57
+ status: 'failed'
58
+ }
43
59
  })
60
+ ```
61
+
62
+ ##### 2. 使用泛型指定自定义类型
44
63
 
45
- // 2. Load initial data
46
- await flow.initData({
64
+ ```typescript
65
+ import { updateState, ENUM } from '@flowlist/js-core'
66
+
67
+ interface MessageDTO {
68
+ clientMsgId: string
69
+ content: string
70
+ status: 'pending' | 'success' | 'failed'
71
+ timestamp: number
72
+ }
73
+
74
+ // 使用泛型指定类型
75
+ updateState<Partial<MessageDTO>>({
47
76
  getter,
48
77
  setter,
49
- cache,
50
- func: 'fetchPosts',
51
- type: 'page',
52
- query: { userId: 123 },
53
- api,
54
- uniqueKey: 'id',
55
- cacheTimeout: 300 // 5 minutes
78
+ func: 'getMessages',
79
+ type: ENUM.FETCH_TYPE.AUTO,
80
+ method: ENUM.CHANGE_TYPE.RESULT_ITEM_MERGE,
81
+ id: msg.clientMsgId,
82
+ uniqueKey: 'clientMsgId',
83
+ value: {
84
+ status: 'failed' // TypeScript 会正确推断这个类型
85
+ }
56
86
  })
87
+ ```
57
88
 
58
- // 3. Load more data (e.g., on scroll)
59
- await flow.loadMore({
89
+ #### 常见使用场景
90
+
91
+ ##### 场景 1: 合并单个项目的部分属性
92
+
93
+ ```typescript
94
+ // 更新消息状态
95
+ updateState<Partial<MessageDTO>>({
60
96
  getter,
61
97
  setter,
62
- cache,
63
- func: 'fetchPosts',
64
- type: 'page',
65
- query: { userId: 123 },
66
- api,
67
- uniqueKey: 'id',
68
- errorRetry: false
98
+ func: 'getMessages',
99
+ type: ENUM.FETCH_TYPE.AUTO,
100
+ method: ENUM.CHANGE_TYPE.RESULT_ITEM_MERGE,
101
+ id: messageId,
102
+ uniqueKey: 'clientMsgId',
103
+ value: {
104
+ status: 'success',
105
+ timestamp: Date.now()
106
+ }
69
107
  })
108
+ ```
109
+
110
+ ##### 场景 2: 添加新项目到列表
111
+
112
+ ```typescript
113
+ // 在列表末尾添加新消息
114
+ updateState<MessageDTO>({
115
+ getter,
116
+ setter,
117
+ func: 'getMessages',
118
+ type: ENUM.FETCH_TYPE.AUTO,
119
+ method: ENUM.CHANGE_TYPE.RESULT_ADD_AFTER,
120
+ value: {
121
+ clientMsgId: 'msg-123',
122
+ content: 'Hello World',
123
+ status: 'pending',
124
+ timestamp: Date.now()
125
+ }
126
+ })
127
+ ```
70
128
 
71
- // 4. Update list data locally
72
- await flow.updateState({
129
+ ##### 场景 3: 根据 ID 删除项目
130
+
131
+ ```typescript
132
+ // 删除单个消息
133
+ updateState({
73
134
  getter,
74
135
  setter,
75
- cache,
76
- func: 'fetchPosts',
77
- type: 'page',
78
- query: { userId: 123 },
79
- method: 'push', // or 'delete', 'update', 'merge', etc.
80
- value: newPost,
81
- id: newPost.id,
136
+ func: 'getMessages',
137
+ type: ENUM.FETCH_TYPE.AUTO,
138
+ method: ENUM.CHANGE_TYPE.RESULT_REMOVE_BY_ID,
139
+ id: messageId,
140
+ uniqueKey: 'clientMsgId',
141
+ value: {} // 删除操作不需要 value
142
+ })
143
+
144
+ // 批量删除多个消息
145
+ updateState({
146
+ getter,
147
+ setter,
148
+ func: 'getMessages',
149
+ type: ENUM.FETCH_TYPE.AUTO,
150
+ method: ENUM.CHANGE_TYPE.RESULT_REMOVE_BY_ID,
151
+ id: [messageId1, messageId2, messageId3],
152
+ uniqueKey: 'clientMsgId',
153
+ value: {}
154
+ })
155
+ ```
156
+
157
+ ##### 场景 4: 更新深层嵌套的属性
158
+
159
+ ```typescript
160
+ interface ComplexMessage {
161
+ id: string
162
+ metadata: {
163
+ sender: {
164
+ name: string
165
+ avatar: string
166
+ }
167
+ }
168
+ }
169
+
170
+ updateState({
171
+ getter,
172
+ setter,
173
+ func: 'getMessages',
174
+ type: ENUM.FETCH_TYPE.AUTO,
175
+ method: ENUM.CHANGE_TYPE.RESULT_UPDATE_KV,
176
+ id: messageId,
82
177
  uniqueKey: 'id',
83
- changeKey: 'result',
84
- cacheTimeout: 300
178
+ changeKey: 'metadata.sender.name',
179
+ value: 'New Name'
180
+ })
181
+ ```
182
+
183
+ ##### 场景 5: 批量更新列表项
184
+
185
+ ```typescript
186
+ // 使用 RESULT_LIST_MERGE 批量更新多个项目
187
+ updateState({
188
+ getter,
189
+ setter,
190
+ func: 'getMessages',
191
+ type: ENUM.FETCH_TYPE.AUTO,
192
+ method: ENUM.CHANGE_TYPE.RESULT_LIST_MERGE,
193
+ uniqueKey: 'clientMsgId',
194
+ value: [
195
+ { clientMsgId: 'msg-1', status: 'success' },
196
+ { clientMsgId: 'msg-2', status: 'failed' },
197
+ { clientMsgId: 'msg-3', status: 'success' }
198
+ ]
85
199
  })
86
200
  ```
201
+
202
+ #### 所有可用的变更类型
203
+
204
+ ```typescript
205
+ ENUM.CHANGE_TYPE = {
206
+ SEARCH_FIELD: 'search', // 搜索并返回匹配的项目
207
+ RESET_FIELD: 'reset', // 重置整个字段
208
+ RESULT_UPDATE_KV: 'update', // 更新指定项的深层属性
209
+ RESULT_ADD_AFTER: 'push', // 在列表末尾添加项目
210
+ RESULT_ADD_BEFORE: 'unshift', // 在列表开头添加项目
211
+ RESULT_REMOVE_BY_ID: 'delete', // 根据 ID 删除项目
212
+ RESULT_INSERT_TO_BEFORE: 'insert-before', // 在指定项之前插入
213
+ RESULT_INSERT_TO_AFTER: 'insert-after', // 在指定项之后插入
214
+ RESULT_LIST_MERGE: 'patch', // 批量合并更新多个项目
215
+ RESULT_ITEM_MERGE: 'merge' // 合并单个项目的属性
216
+ }
217
+ ```
218
+
219
+ #### 最佳实践
220
+
221
+ 1. **使用 TypeScript 接口定义数据结构**
222
+ - 为你的数据模型创建明确的接口定义
223
+ - 使用泛型参数获得更好的类型推断
224
+
225
+ 2. **选择合适的 uniqueKey**
226
+ - 确保 uniqueKey 在列表中是唯一的
227
+ - 支持嵌套路径,如 `'user.id'`
228
+
229
+ 3. **根据操作类型传递正确的参数**
230
+ - 删除操作需要 `id` 参数
231
+ - 更新操作需要 `id` 和 `value` 参数
232
+ - 添加操作只需要 `value` 参数
233
+
234
+ 4. **处理异步操作**
235
+
236
+ ```typescript
237
+ try {
238
+ await updateState({
239
+ // ... 参数
240
+ })
241
+ console.log('更新成功')
242
+ } catch (error) {
243
+ console.error('更新失败:', error)
244
+ }
245
+ ```
246
+
247
+ 5. **性能优化**
248
+ - 批量操作时使用 `RESULT_LIST_MERGE` 而不是多次调用 `RESULT_ITEM_MERGE`
249
+ - 避免在循环中频繁调用 updateState
250
+
251
+ #### 类型安全提示
252
+
253
+ 项目现在支持完整的 TypeScript 类型推断:
254
+
255
+ - ✅ 所有函数参数都有明确的类型定义
256
+ - ✅ 支持泛型以适应不同的数据结构
257
+ - ✅ 自动类型检查和智能提示
258
+ - ✅ 编译时类型错误检测
259
+
260
+ #### 测试覆盖率
261
+
262
+ 当前测试覆盖率:
263
+
264
+ - 语句覆盖率: 99.33%
265
+ - 分支覆盖率: 95.1%
266
+ - 函数覆盖率: 100%
267
+ - 行覆盖率: 99.75%
268
+
269
+ 所有 159 个测试用例全部通过 ✓
package/dist/index.d.mts CHANGED
@@ -3,212 +3,209 @@
3
3
  */
4
4
  type ObjectKey = string | number;
5
5
  /**
6
- * 通用键值对映射(注意:尽管 ObjectKey 包含 number,
7
- * 但在实际对象中,number 键会被转为 string。
8
- * 此处使用 string 以符合 Record 的实际行为 [[3]])
6
+ * 通用键值对映射 - 使用 Record 以保持灵活性和性能
9
7
  */
10
8
  type KeyMap = Record<string, unknown>;
11
9
  /**
12
- * 形态数组
10
+ * 数组元素类型
13
11
  */
14
- type ResultType = KeyMap | unknown[];
12
+ type ResultArrayType = KeyMap[];
15
13
  /**
16
- * 数据源类型:可以是 API 路径字符串,或返回 Promise 的函数
14
+ * 对象结果类型:键为字符串,值为 KeyMap 数组
17
15
  */
18
- type DataSource = string | ((params: unknown) => Promise<unknown>);
16
+ type ResultObjectType = Record<string, KeyMap[]>;
19
17
  /**
20
- * 字段获取器:根据字段名获取状态对象
18
+ * 结果类型:可以是数组或对象
21
19
  */
22
- type FieldGetter = (key: string) => DefaultField | undefined;
20
+ type ResultType = ResultArrayType | ResultObjectType;
23
21
  /**
24
- * 状态设置器函数类型
22
+ * API 函数类型
25
23
  */
26
- type FieldSetter = (obj: SetterFuncParams) => void;
24
+ type ApiFunction = (_params: KeyMap) => Promise<ApiResponse>;
27
25
  /**
28
- * 获取数据后的回调函数
26
+ * 数据源类型:可以是 API 路径字符串,或返回 Promise 的函数
29
27
  */
30
- type FetchResultCallback = (obj: {
31
- params: GenerateParamsResp;
32
- data: ApiResponse;
33
- refresh: boolean;
34
- }) => void;
28
+ type DataSource = string | ApiFunction;
29
+ interface DefaultField {
30
+ result: ResultType;
31
+ noMore: boolean;
32
+ nothing: boolean;
33
+ loading: boolean;
34
+ error: Error | null;
35
+ extra: KeyMap | null;
36
+ fetched: boolean;
37
+ page: number;
38
+ total: number;
39
+ }
40
+ type FieldKeys = keyof DefaultField;
35
41
  /**
36
- * 数据获取类型枚举
42
+ * 字段获取器:根据字段名获取状态对象
37
43
  */
38
- type FetchType = 'jump' | 'sinceId' | 'page' | 'seenIds' | 'auto';
44
+ type FieldGetter = (_key: string) => DefaultField | undefined;
39
45
  /**
40
- * 字段数据的关键字
46
+ * Setter 函数的参数
41
47
  */
42
- type FieldKeys = 'result' | 'noMore' | 'nothing' | 'loading' | 'error' | 'extra' | 'fetched' | 'page' | 'total';
43
- interface CommonParams {
44
- func: DataSource;
45
- type: FetchType;
46
- query?: KeyMap;
47
- uniqueKey?: string;
48
- callback?: FetchResultCallback;
48
+ interface SetterFuncParams {
49
+ readonly key: string;
50
+ readonly type: number;
51
+ readonly value: Partial<DefaultField> | DefaultField;
52
+ readonly callback?: (_obj?: KeyMap) => void;
49
53
  }
50
54
  /**
51
- * 生成请求参数的输入
55
+ * 状态设置器函数类型
52
56
  */
53
- interface GenerateParamsType {
54
- field: DefaultField;
55
- uniqueKey?: string;
56
- query?: KeyMap;
57
- type: FetchType;
58
- }
57
+ type FieldSetter = (_obj: SetterFuncParams) => void;
58
+ /**
59
+ * 数据获取类型枚举
60
+ */
61
+ type FetchType = 'jump' | 'sinceId' | 'page' | 'seenIds' | 'auto';
59
62
  /**
60
63
  * 生成请求参数的输出
61
64
  */
62
- interface GenerateParamsResp {
65
+ interface GenerateParamsResp extends KeyMap {
63
66
  seen_ids?: string;
64
67
  since_id?: ObjectKey;
65
68
  is_up?: 0 | 1;
66
69
  page?: number;
67
70
  }
68
71
  /**
69
- * Setter 函数的参数
72
+ * 生成请求参数的输入
70
73
  */
71
- interface SetterFuncParams {
72
- key: string;
73
- type: number;
74
- value: unknown;
75
- callback?: (obj?: KeyMap) => void;
74
+ interface GenerateParamsType {
75
+ readonly field: DefaultField;
76
+ readonly uniqueKey?: string;
77
+ readonly query?: KeyMap;
78
+ readonly type: FetchType;
76
79
  }
77
80
  /**
78
- * 默认字段数据结构,使用泛型 T 和 E 分别代表 result 和 extra 的类型
81
+ * API 响应结构
79
82
  */
80
- interface DefaultField {
81
- result: ResultType;
82
- noMore: boolean;
83
- nothing: boolean;
84
- loading: boolean;
85
- error: null | Error;
86
- extra: unknown;
87
- fetched: boolean;
88
- page: number;
89
- total: number;
83
+ interface ApiResponse {
84
+ readonly result: ResultType;
85
+ readonly extra?: KeyMap;
86
+ readonly total?: number;
87
+ readonly no_more?: boolean;
90
88
  }
91
89
  /**
92
- * API 响应结构,使用泛型 T 和 E
90
+ * 获取数据后的回调函数
93
91
  */
94
- interface ApiResponse {
95
- result: ResultType;
96
- extra?: unknown;
97
- total?: number;
98
- no_more?: boolean;
92
+ type FetchResultCallback = (_obj: {
93
+ params: KeyMap;
94
+ data: ApiResponse;
95
+ refresh: boolean;
96
+ }) => void;
97
+ interface CommonParams {
98
+ readonly func: DataSource;
99
+ readonly type: FetchType;
100
+ readonly query?: KeyMap;
101
+ readonly uniqueKey?: string;
102
+ readonly callback?: FetchResultCallback;
99
103
  }
100
104
  interface BaseFetchConfig extends CommonParams {
101
- getter: FieldGetter;
102
- setter: FieldSetter;
103
- api?: KeyMap;
105
+ readonly getter: FieldGetter;
106
+ readonly setter: FieldSetter;
107
+ readonly api?: Record<string, ApiFunction>;
104
108
  }
105
109
  /**
106
- * 初始化状态的参数
110
+ * 初始化状态的参数对外接口
111
+ */
112
+ interface InitStateParams {
113
+ readonly func: DataSource;
114
+ readonly type: FetchType;
115
+ readonly query?: KeyMap;
116
+ readonly opts?: Partial<DefaultField>;
117
+ }
118
+ /**
119
+ * 初始化状态的参数(内部)
107
120
  */
108
121
  interface InitStateType extends InitStateParams {
109
- getter: FieldGetter;
110
- setter: FieldSetter;
122
+ readonly getter: FieldGetter;
123
+ readonly setter: FieldSetter;
111
124
  }
112
125
  /**
113
- * 初始化数据的参数
126
+ * 初始化数据的参数对外接口
127
+ */
128
+ type InitDataParams = CommonParams;
129
+ /**
130
+ * 初始化数据的参数(内部)
114
131
  */
115
132
  type InitDataType = BaseFetchConfig;
116
133
  /**
117
- * 加载更多的参数
134
+ * 加载更多的参数对外接口
135
+ */
136
+ interface LoadMoreParams extends CommonParams {
137
+ readonly errorRetry?: boolean;
138
+ }
139
+ /**
140
+ * 加载更多的参数(内部)
118
141
  */
119
142
  interface LoadMoreType extends BaseFetchConfig {
120
- errorRetry?: boolean;
143
+ readonly errorRetry?: boolean;
121
144
  }
122
145
  /**
123
- * 更新状态的参数
146
+ * 更新状态的参数(内部使用)
124
147
  */
125
- interface UpdateStateType {
126
- getter: FieldGetter;
127
- setter: FieldSetter;
128
- func: DataSource;
129
- type: FetchType;
130
- query?: KeyMap;
131
- method: string;
132
- value: ResultArrayType$1 | Record<ObjectKey, KeyMap>;
133
- id?: string | number | ObjectKey[];
134
- changeKey?: string;
135
- uniqueKey?: string;
148
+ interface UpdateStateType<T = KeyMap> {
149
+ readonly getter: FieldGetter;
150
+ readonly setter: FieldSetter;
151
+ readonly func: DataSource;
152
+ readonly type: FetchType;
153
+ readonly query?: KeyMap;
154
+ readonly method: string;
155
+ readonly value: T | ResultArrayType | ResultObjectType | KeyMap;
156
+ readonly id?: ObjectKey | ObjectKey[];
157
+ readonly changeKey?: string;
158
+ readonly uniqueKey?: string;
159
+ }
160
+ /**
161
+ * 更新状态的参数(对外接口)
162
+ */
163
+ interface UpdateStateParams<T = KeyMap> {
164
+ readonly func: DataSource;
165
+ readonly type: FetchType;
166
+ readonly query?: KeyMap;
167
+ readonly method: string;
168
+ readonly value: T | ResultArrayType | ResultObjectType | KeyMap;
169
+ readonly id?: ObjectKey | ObjectKey[];
170
+ readonly changeKey?: string;
171
+ readonly uniqueKey?: string;
136
172
  }
137
173
  /**
138
174
  * 设置数据的参数
139
175
  */
140
176
  interface SetDataType {
141
- getter: FieldGetter;
142
- setter: FieldSetter;
143
- data: ApiResponse;
144
- fieldName: string;
145
- type: FetchType;
146
- page: number;
147
- insertBefore: boolean;
177
+ readonly getter: FieldGetter;
178
+ readonly setter: FieldSetter;
179
+ readonly data: ApiResponse;
180
+ readonly fieldName: string;
181
+ readonly type: FetchType;
182
+ readonly page: number;
183
+ readonly insertBefore: boolean;
148
184
  }
149
185
  /**
150
186
  * 设置错误的参数
151
187
  */
152
188
  interface SetErrorType {
153
- setter: FieldSetter;
154
- fieldName: string;
155
- error: null | Error;
156
- }
157
- type ResultArrayType$1 = KeyMap[];
158
- type ResultObjectType$1 = Record<ObjectKey, KeyMap[]>;
159
- type InitDataParams = CommonParams;
160
- interface LoadMoreParams extends CommonParams {
161
- errorRetry?: boolean;
162
- }
163
- interface InitStateParams {
164
- func: DataSource;
165
- type: FetchType;
166
- query?: KeyMap;
167
- opts?: Partial<DefaultField>;
189
+ readonly setter: FieldSetter;
190
+ readonly fieldName: string;
191
+ readonly error: Error | null;
168
192
  }
169
193
 
170
194
  declare const initState: ({ getter, setter, func, type, query, opts }: InitStateType) => Promise<void>;
171
195
  declare const initData: ({ getter, setter, func, type, query, api, uniqueKey, callback }: InitDataType) => Promise<void>;
172
196
  declare const loadMore: ({ getter, setter, query, type, func, api, uniqueKey, errorRetry, callback }: LoadMoreType) => Promise<void>;
173
- declare const updateState: ({ getter, setter, func, type, query, method, value, id, uniqueKey, changeKey }: UpdateStateType) => Promise<unknown>;
197
+ declare const updateState: <T = KeyMap>({ getter, setter, func, type, query, method, value, id, uniqueKey, changeKey }: UpdateStateType<T>) => Promise<unknown>;
174
198
 
175
- /**
176
- * 判断数据是否为对象结果(即没有 result 字段)
177
- * 注意:这里我们假设 "对象结果" 指的是一个普通的对象,而不是 ApiResponse。
178
- */
199
+ declare const isArray: (data: unknown) => data is unknown[];
179
200
  declare const isObjectResult: (data: unknown) => data is Record<string, unknown>;
180
- /**
181
- * 生成默认字段
182
- */
183
201
  declare const generateDefaultField: (opts?: Partial<DefaultField>) => DefaultField;
184
- /**
185
- * 根据参数生成 field 的 namespace
186
- */
187
202
  declare const generateFieldName: ({ func, type, query }: InitDataParams) => string;
188
- /**
189
- * 根据 key object 里拿 value
190
- */
191
- declare const getObjectDeepValue: (field: unknown, keys?: string | string[]) => unknown;
192
- /**
193
- * 安全地更新对象的深层值
194
- */
195
- declare const updateObjectDeepValue: (field: Record<string, unknown>, changeKey: string, value: unknown) => void;
196
- type ResultArrayType = KeyMap[];
197
- type ResultObjectType = Record<ObjectKey, KeyMap[]>;
203
+ declare const getObjectDeepValue: (field: unknown, keys: string | string[]) => unknown;
204
+ declare const updateObjectDeepValue: (field: KeyMap, changeKey: string, value: unknown) => void;
198
205
  declare const searchValueByKey: (result: ResultArrayType | ResultObjectType, id: ObjectKey, key: string) => unknown;
199
206
  declare const computeMatchedItemIndex: (itemId: ObjectKey, fieldArr: ResultArrayType, changingKey: string) => number;
200
207
  declare const combineArrayData: (fieldArray: ResultArrayType, value: ResultArrayType | Record<ObjectKey, KeyMap>, changingKey: string) => void;
201
- /**
202
- * 判断参数是否为数组
203
- */
204
- declare const isArray: (data: unknown) => data is unknown[];
205
- /**
206
- * 设置一个响应式的数据到对象上
207
- */
208
208
  declare const setReactivityField: (field: DefaultField, key: FieldKeys, value: unknown, type: FetchType, insertBefore: boolean) => void;
209
- /**
210
- * 计算一个数据列的长度
211
- */
212
209
  declare const computeResultLength: (data: unknown) => number;
213
210
  declare const generateRequestParams: ({ field, uniqueKey, query, type }: GenerateParamsType) => GenerateParamsResp;
214
211
 
@@ -260,4 +257,4 @@ declare const _default: {
260
257
  readonly DEFAULT_UNIQUE_KEY_NAME: "id";
261
258
  };
262
259
 
263
- export { type ApiResponse, type DefaultField, _default as ENUM, type FetchType, type FieldGetter, type FieldKeys, type FieldSetter, type GenerateParamsResp, type GenerateParamsType, type InitDataParams, type InitDataType, type InitStateParams, type InitStateType, type KeyMap, type LoadMoreParams, type LoadMoreType, type ObjectKey, type ResultArrayType$1 as ResultArrayType, type ResultObjectType$1 as ResultObjectType, type ResultType, type SetDataType, type SetErrorType, type SetterFuncParams, type UpdateStateType, initData, initState, loadMore, updateState, utils };
260
+ export { type ApiFunction, type ApiResponse, type DataSource, type DefaultField, _default as ENUM, type FetchResultCallback, type FetchType, type FieldGetter, type FieldKeys, type FieldSetter, type GenerateParamsResp, type GenerateParamsType, type InitDataParams, type InitDataType, type InitStateParams, type InitStateType, type KeyMap, type LoadMoreParams, type LoadMoreType, type ObjectKey, type ResultArrayType, type ResultObjectType, type ResultType, type SetDataType, type SetErrorType, type SetterFuncParams, type UpdateStateParams, type UpdateStateType, initData, initState, loadMore, updateState, utils };