Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

concent-utils

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

concent-utils - npm Package Compare versions

Comparing version 1.2.4 to 1.2.5

10

lib/index.d.ts
/**
* 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 || {};

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc