@merkur/core 0.46.0-rc.4 → 0.46.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/package.json +2 -2
  2. package/types.d.ts +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@merkur/core",
3
- "version": "0.46.0-rc.4",
3
+ "version": "0.46.0",
4
4
  "description": "Merkur is tiny and extensible library for creating front-end microservices.",
5
5
  "main": "lib/index",
6
6
  "module": "lib/index",
@@ -53,5 +53,5 @@
53
53
  "access": "public"
54
54
  },
55
55
  "homepage": "https://merkur.js.org/",
56
- "gitHead": "f0910c6fab2206dceced9ad7e31da4ed65dd7098"
56
+ "gitHead": "87b662ef7cd7a84fc1724023607ef2cbbae2c811"
57
57
  }
package/types.d.ts CHANGED
@@ -98,14 +98,14 @@ export declare function createMerkurWidget<
98
98
  // `createMerkurWidget()` binds all WidgetFunctions to the widget instance using `bindWidgetToFunctions()`
99
99
  // This series of types replicates that for the typing.
100
100
  type TupleTail<T extends any[]> = T extends [any, ...infer Rest] ? Rest : never;
101
- type FunctionLike = (...args: any[]) => any;
101
+ type FunctionLike = (widget: WidgetPartial, ...args: any[]) => any;
102
102
  type BoundWidgetFunction<T extends FunctionLike> = (
103
103
  ...args: TupleTail<Parameters<T>>
104
104
  ) => ReturnType<T>;
105
- type BoundWidget<T> = {
105
+ export type WithBoundWidgetFunctions<T> = {
106
106
  [K in keyof T]: T[K] extends FunctionLike ? BoundWidgetFunction<T[K]> : T[K];
107
107
  };
108
- export interface Widget extends BoundWidget<WidgetPartial> {}
108
+ export interface Widget extends WithBoundWidgetFunctions<WidgetPartial> {}
109
109
 
110
110
  export type MerkurCreate = (
111
111
  widgetProperties: WidgetProperties,