@tramvai/types-actions-state-context 2.10.2 → 2.20.1
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/lib/actions.d.ts +3 -0
- package/package.json +2 -2
package/lib/actions.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { ConsumerContext, Dispatch, GetState } from './state';
|
|
|
3
3
|
export declare type ActionContext = ConsumerContext;
|
|
4
4
|
export declare type ActionConditionsParameters = {
|
|
5
5
|
requiredCoreRoles?: string[];
|
|
6
|
+
requiredRoles?: string[];
|
|
6
7
|
onlyBrowser?: boolean;
|
|
7
8
|
onlyServer?: boolean;
|
|
8
9
|
pageBrowser?: boolean;
|
|
@@ -35,6 +36,7 @@ export interface PlatformAction<Payload extends any = any, Result = any, Context
|
|
|
35
36
|
}
|
|
36
37
|
export declare type TramvaiActionType = 'page' | 'standalone';
|
|
37
38
|
export interface TramvaiActionContext<CurrentDeps> {
|
|
39
|
+
abortController: AbortController;
|
|
38
40
|
abortSignal: AbortSignal;
|
|
39
41
|
executeAction<Params extends any[], Result, Deps>(action: TramvaiAction<Params, Result, Deps>, ...params: Params): Result extends Promise<any> ? Result : Promise<Result>;
|
|
40
42
|
executeAction<Payload, Result, Deps>(action: Action<Payload, Result, Deps>, payload?: Payload): Result extends Promise<any> ? Result : Promise<Result>;
|
|
@@ -55,3 +57,4 @@ export interface TramvaiAction<Params extends any[], Result, Deps> extends Tramv
|
|
|
55
57
|
}
|
|
56
58
|
export declare type UnknownAction<Result = any> = (...args: any[]) => Result;
|
|
57
59
|
export declare type AnyAction<Payload = any, Result = any, Deps = any> = Action<Payload, Result, Deps> | PlatformAction<Payload, Result> | UnknownAction;
|
|
60
|
+
export declare type PageAction = Action<void, void, any> | TramvaiAction<[], void, any>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/types-actions-state-context",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.20.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"tslib": "^2.0.3"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@tinkoff/dippy": "0.
|
|
24
|
+
"@tinkoff/dippy": "0.8.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {},
|
|
27
27
|
"license": "Apache-2.0",
|