concent-utils
Advanced tools
Comparing version 1.2.4 to 1.2.5
/** | ||
* concent 相关的一些公共封装函数 | ||
*/ | ||
import { StateType, IRefCtxM, ModuleDesc, ReducerCallerParams, IReducerFn, IActionCtxBase, ICtxBase, IAnyObj, SettingsType, ComputedValType, ComputedValTypeForFn, MultiComputedFn, MultiComputed } from 'concent'; | ||
import { IRefCtxM, ModuleDesc, ReducerCallerParams, IReducerFn, IActionCtxBase, ICtxBase, IAnyObj, SettingsType, ComputedValType, ComputedValTypeForFn, MultiComputedFn, MultiComputed } from 'concent'; | ||
/** | ||
@@ -61,5 +61,5 @@ * 调用目标函数,用于对接 reducer里的 ghost函数 | ||
export declare function makeUseModelWithSetup<RootInfo, ModelDesc extends ModuleDesc>(moduleName: string): | ||
<Setup extends SetupParam, CuDesc extends MultiComputed<StateType<ModuleDesc['state']>>, P extends IAnyObj, Extra extends IAnyObj> | ||
(setup: Setup, opts?: Opts<CuDesc, P, Extra> | undefined) | ||
=> IRefCtxM<RootInfo, P, ModelDesc, SettingsType<Setup>, ComputedValType<CuDesc>, Extra>; | ||
<Setup extends SetupParam, CuDesc extends MultiComputed<any>, P extends IAnyObj, Extra extends IAnyObj> | ||
(setup: Setup, opts?: Opts<CuDesc, P, Extra> | undefined) => IRefCtxM<RootInfo, P, ModelDesc, SettingsType<Setup>, ComputedValType<CuDesc>, Extra>; | ||
/** | ||
@@ -70,4 +70,4 @@ * 函数型 cuSpec 用此函数来推导类型 | ||
export declare function makeUseModelWithSetupCuf<RootInfo, ModelDesc extends ModuleDesc>(moduleName: string): | ||
<Setup extends SetupParam, CuDesc extends MultiComputedFn<StateType<ModuleDesc['state']>>, P extends IAnyObj, Extra extends IAnyObj> | ||
<Setup extends SetupParam, CuDesc extends MultiComputedFn<any>, P extends IAnyObj, Extra extends IAnyObj> | ||
(setup: Setup, opts?: CufOpts<CuDesc, P, Extra> | undefined) | ||
=> IRefCtxM<RootInfo, P, ModelDesc, SettingsType<Setup>, ComputedValTypeForFn<CuDesc>, Extra>; |
@@ -65,3 +65,3 @@ { | ||
}, | ||
"version": "1.2.4" | ||
"version": "1.2.5" | ||
} |
@@ -8,3 +8,3 @@ /** | ||
ICtxBase, IAnyObj, SettingsType, ComputedValType, ComputedValTypeForFn, | ||
MultiComputedFn, MultiComputed, StateType, | ||
MultiComputedFn, MultiComputed, | ||
} from 'concent'; | ||
@@ -106,3 +106,4 @@ | ||
return function useModelWithSetup< | ||
Setup extends SetupParam, CuDesc extends MultiComputed<StateType<ModuleDesc['state']>>, P extends IAnyObj, Extra extends IAnyObj, | ||
// 同 [?-1] | ||
Setup extends SetupParam, CuDesc extends MultiComputed<any>, P extends IAnyObj, Extra extends IAnyObj, | ||
>(setup: Setup, opts?: Opts<CuDesc, P, Extra>) { | ||
@@ -139,3 +140,6 @@ const { cuDesc, props, extra, passCuDesc = true, ccClassKey, tag } = opts || {}; | ||
return function useModelWithSetupCuf< | ||
Setup extends SetupParam, CuDesc extends MultiComputedFn<StateType<ModuleDesc['state']>>, P extends IAnyObj, Extra extends IAnyObj, | ||
// [?-1] | ||
// 暂时不用 MultiComputedFn<StateType<ModuleDesc['state']>> 写法 | ||
// 目前这里 ts 直接提前推导出类型了,而不是等待用户传递了泛型后再推,猜测可能是 ts bug? | ||
Setup extends SetupParam, CuDesc extends MultiComputedFn<any>, P extends IAnyObj, Extra extends IAnyObj, | ||
>(setup: Setup, opts?: CufOpts<CuDesc, P, Extra>) { | ||
@@ -142,0 +146,0 @@ const { cuDesc, props, extra, passCuDesc = true, ccClassKey, tag } = opts || {}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21237
358