@matreshka/bff 0.11.1 → 0.11.2

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.
@@ -17,7 +17,9 @@ export type ServerActionProperties<ComponentType extends Componentable, PayloadT
17
17
  * Используется для выполнения произвольного кода на сервере, например, при клике по кнопке.
18
18
  * @param properties Свойства действия.
19
19
  */
20
- export type ServerActionHandler<ComponentType extends Componentable, PayloadType = undefined> = (properties: ServerActionProperties<ComponentType, PayloadType>) => void | Promise<void>;
20
+ type SyncServerActionHandler<ComponentType extends Componentable, PayloadType = undefined> = (properties: ServerActionProperties<ComponentType, PayloadType>) => void;
21
+ type AsyncServerActionHandler<ComponentType extends Componentable, PayloadType = undefined> = (properties: ServerActionProperties<ComponentType, PayloadType>) => Promise<void>;
22
+ export type ServerActionHandler<ComponentType extends Componentable, PayloadType = undefined> = SyncServerActionHandler<ComponentType, PayloadType> | AsyncServerActionHandler<ComponentType, PayloadType>;
21
23
  /**
22
24
  * Серверное действие, выполняемое BFF при взаимодействии клиента с компонентом.
23
25
  */
@@ -28,3 +30,4 @@ export declare class ServerAction<ComponentType extends Componentable, PayloadTy
28
30
  payload(): object;
29
31
  execute(properties: ServerActionProperties<ComponentType, PayloadType>): void;
30
32
  }
33
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matreshka/bff",
3
- "version": "0.11.1",
3
+ "version": "0.11.2",
4
4
  "description": "Matreshka BFF: server-driven UI runtime — routing, pages, context, component DSL, and platform APIs",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",