soda-tanstack-query 0.0.4 → 0.0.5
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
|
@@ -12,7 +12,7 @@ import { StrictPartial } from "soda-type"
|
|
|
12
12
|
/** 判断函数的参数是否为必需的 */
|
|
13
13
|
export type IsParamRequired<TFn extends (params: any) => any> = Parameters<TFn> extends [param: any] ? true : false
|
|
14
14
|
|
|
15
|
-
// 要在第一个加一个重载,因为 options
|
|
15
|
+
// 要在第一个加一个重载,因为 options 是可选的,如果不加这个重载,options 类型会匹配到 DefinedInitialDataOptions,会误认为 initialData 被传递了,造成返回类型必定不为 undefined
|
|
16
16
|
|
|
17
17
|
/** 参数必须的 useQuery */
|
|
18
18
|
interface _UseQueryWithParams<
|