@tramvai/tokens-common 2.145.1 → 2.146.0

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.
Files changed (2) hide show
  1. package/lib/action.d.ts +3 -1
  2. package/package.json +4 -4
package/lib/action.d.ts CHANGED
@@ -46,9 +46,10 @@ export interface ActionExecution {
46
46
  runInContext<Params extends any[], Result, Deps>(context: ExecutionContext | null, action: TramvaiAction<Params, Result, Deps>, ...params: Params): Result extends Promise<any> ? Result : Promise<Result>;
47
47
  runInContext<Payload, Result, Deps>(context: ExecutionContext | null, action: Action<Payload, Result, Deps>, payload: Payload): Result extends Promise<any> ? Result : Promise<Result>;
48
48
  execution: Map<string, Record<string, any>>;
49
+ canExecute<Params extends any[], Result, Deps>(action: TramvaiAction<Params, Result, Deps>): boolean;
50
+ canExecute<Payload, Result, Deps>(action: Action<Payload, Result, Deps>): boolean;
49
51
  }
50
52
  export interface ActionConditionChecker<State = any> {
51
- payload: any;
52
53
  parameters: any;
53
54
  conditions: Record<string, any>;
54
55
  type: 'global' | 'local';
@@ -69,6 +70,7 @@ export interface Deferred<Data = any> {
69
70
  rejectReason?: Error;
70
71
  isResolved: () => boolean;
71
72
  isRejected: () => boolean;
73
+ reset: () => void;
72
74
  }
73
75
  export interface DeferredActionsMap {
74
76
  get(key: string): Deferred | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/tokens-common",
3
- "version": "2.145.1",
3
+ "version": "2.146.0",
4
4
  "description": "Tramvai tokens for @tramvai/module-common",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.es.js",
@@ -20,14 +20,14 @@
20
20
  "dependencies": {
21
21
  "@tinkoff/lru-cache-nano": "^7.8.1",
22
22
  "@tinkoff/url": "0.8.6",
23
- "@tramvai/react": "2.145.1",
24
- "@tramvai/tokens-core": "2.145.1",
23
+ "@tramvai/react": "2.146.0",
24
+ "@tramvai/tokens-core": "2.146.0",
25
25
  "node-abort-controller": "^3.0.1"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@tinkoff/dippy": "0.8.15",
29
29
  "@tinkoff/logger": "0.10.67",
30
- "@tramvai/types-actions-state-context": "2.145.1",
30
+ "@tramvai/types-actions-state-context": "2.146.0",
31
31
  "react": ">=16.8",
32
32
  "tslib": "^2.4.0"
33
33
  },