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.1.1 to 1.2.1

6

lib/index.d.ts

@@ -51,6 +51,6 @@ /**

/**
*
* 普通定义的ceDesc
* @param moduleName
*/
export declare function makeUseModelWithSetup<RootInfo, ModelDesc extends ModuleDesc>(moduleName: string): <Setup extends SetupParam, CuDesc extends MultiComputed, P extends IAnyObj, Extra extends IAnyObj>(setup: Setup, opts?: Opts<CuDesc, P, Extra> | undefined) => IRefCtxM<RootInfo, P, ModelDesc, SettingsType<Setup>, ComputedValType<CuDesc>, Extra>;
export declare function makeUseModelWithSetup<RootInfo, ModelDesc extends ModuleDesc>(moduleName: string): <Setup extends SetupParam, CuDesc extends MultiComputed<IAnyObj>, P extends IAnyObj, Extra extends IAnyObj>(setup: Setup, opts?: Opts<CuDesc, P, Extra> | undefined) => IRefCtxM<RootInfo, P, ModelDesc, SettingsType<Setup>, ComputedValType<CuDesc>, Extra>;
/**

@@ -60,2 +60,2 @@ * 函数型 cuSpec 需要用此函数来推导类型

*/
export declare function makeUseModelWithSetupCuf<RootInfo, ModelDesc extends ModuleDesc>(moduleName: string): <Setup extends SetupParam, CuDesc extends MultiComputedFn, P extends IAnyObj, Extra extends IAnyObj>(setup: Setup, opts?: CufOpts<CuDesc, P, Extra> | undefined) => IRefCtxM<RootInfo, P, ModelDesc, SettingsType<Setup>, ComputedValTypeForFn<CuDesc>, Extra>;
export declare function makeUseModelWithSetupCuf<RootInfo, ModelDesc extends ModuleDesc>(moduleName: string): <Setup extends SetupParam, CuDesc extends MultiComputedFn<IAnyObj>, P extends IAnyObj, Extra extends IAnyObj>(setup: Setup, opts?: CufOpts<CuDesc, P, Extra> | undefined) => IRefCtxM<RootInfo, P, ModelDesc, SettingsType<Setup>, ComputedValTypeForFn<CuDesc>, Extra>;

@@ -83,3 +83,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

/**
*
* 普通定义的ceDesc
* @param moduleName

@@ -89,2 +89,3 @@ */

/**
* const ceDesc = {a:()=>1, b:()=>2};
* function setup(ctx:CtrPre){ }

@@ -108,2 +109,12 @@ *

export function makeUseModelWithSetupCuf(moduleName) {
/**
* const ceDesc = (ctx:CtrPre)=>{
* return {a:()=>1, b:()=>2};
* }
*
* function setup(ctx:CtrPre){ }
*
* makeUseModelWithSetupCuf(setup);
* makeUseModelWithSetupCuf(setup, { extra, props, ceDesc });
*/
return function useModelWithSetupCuf(setup, opts) {

@@ -110,0 +121,0 @@ var _a = opts || {}, cuDesc = _a.cuDesc, props = _a.props, extra = _a.extra, _b = _a.passCuDesc, passCuDesc = _b === void 0 ? true : _b;

@@ -21,3 +21,3 @@ {

"@typescript-eslint/parser": "^4.7.0",
"concent": "^2.13.10",
"concent": "^2.14.1",
"eslint": "^7.12.1",

@@ -55,3 +55,3 @@ "eslint-config-prettier": "^6.15.0",

"peerDependencies": {
"concent": "^2.12.7"
"concent": "^2.14.1"
},

@@ -67,3 +67,3 @@ "repository": {

},
"version": "1.1.1"
"version": "1.2.1"
}

@@ -8,3 +8,3 @@ /**

ICtxBase, IAnyObj, SettingsType, ComputedValType, ComputedValTypeForFn,
MultiComputedFn, MultiComputed,
MultiComputedFn, MultiComputed, StateType,
} from 'concent';

@@ -87,3 +87,3 @@

/**
*
* 普通定义的ceDesc
* @param moduleName

@@ -94,2 +94,3 @@ */

/**
* const ceDesc = {a:()=>1, b:()=>2};
* function setup(ctx:CtrPre){ }

@@ -101,3 +102,3 @@ *

return function useModelWithSetup<
Setup extends SetupParam, CuDesc extends MultiComputed, P extends IAnyObj, Extra extends IAnyObj,
Setup extends SetupParam, CuDesc extends MultiComputed<StateType<ModuleDesc['state']>>, P extends IAnyObj, Extra extends IAnyObj,
>(setup: Setup, opts?: Opts<CuDesc, P, Extra>) {

@@ -119,4 +120,15 @@ const { cuDesc, props, extra, passCuDesc = true } = opts || {};

export function makeUseModelWithSetupCuf<RootInfo, ModelDesc extends ModuleDesc>(moduleName: string) {
/**
* const ceDesc = (ctx:CtrPre)=>{
* return {a:()=>1, b:()=>2};
* }
*
* function setup(ctx:CtrPre){ }
*
* makeUseModelWithSetupCuf(setup);
* makeUseModelWithSetupCuf(setup, { extra, props, ceDesc });
*/
return function useModelWithSetupCuf<
Setup extends SetupParam, CuDesc extends MultiComputedFn, P extends IAnyObj, Extra extends IAnyObj,
Setup extends SetupParam, CuDesc extends MultiComputedFn<StateType<ModuleDesc['state']>>, P extends IAnyObj, Extra extends IAnyObj,
>(setup: Setup, opts?: CufOpts<CuDesc, P, Extra>) {

@@ -123,0 +135,0 @@ const { cuDesc, props, extra, passCuDesc = true } = 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