@merkur/core 0.45.0 → 0.45.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/package.json +2 -2
- package/types.d.ts +31 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@merkur/core",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.1",
|
|
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": "
|
|
56
|
+
"gitHead": "2a9745c5050c06d43d268c2fdbcb0d2b7f3fb75b"
|
|
57
57
|
}
|
package/types.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export interface SourceAsset extends BaseWidgetAsset {
|
|
|
13
13
|
source: string;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
16
17
|
export interface WidgetDependencies {}
|
|
17
18
|
|
|
18
19
|
export interface Widget {
|
|
@@ -39,8 +40,11 @@ export interface WidgetDefinition {
|
|
|
39
40
|
setup?: WidgetFunction;
|
|
40
41
|
}
|
|
41
42
|
|
|
43
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
42
44
|
export interface WidgetParams {}
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
43
46
|
export interface WidgetInternal {}
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
44
48
|
export interface WidgetExternal {}
|
|
45
49
|
|
|
46
50
|
export interface WidgetPlugin {
|
|
@@ -81,11 +85,13 @@ export interface Merkur {
|
|
|
81
85
|
/**
|
|
82
86
|
* Merkur API types
|
|
83
87
|
*/
|
|
88
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
84
89
|
export interface CreateMerkurWidgetArgs {}
|
|
85
90
|
export declare function createMerkurWidget<
|
|
86
91
|
T extends WidgetDefinition & CreateMerkurWidgetArgs,
|
|
87
92
|
>(widgetDefinition: T): Widget;
|
|
88
93
|
|
|
94
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
|
|
89
95
|
export interface DefineWidgetArgs {}
|
|
90
96
|
export declare function defineWidget<
|
|
91
97
|
T extends WidgetDefinition & WidgetProperties & DefineWidgetArgs,
|
|
@@ -97,3 +103,28 @@ export declare function hookMethod(
|
|
|
97
103
|
path: string,
|
|
98
104
|
handler: (widget: Widget, originalFunction: any, ...args: any[]) => any,
|
|
99
105
|
): Promise<void>;
|
|
106
|
+
|
|
107
|
+
export declare function assignMissingKeys<T extends object>(
|
|
108
|
+
target: T,
|
|
109
|
+
...sources: Partial<T>[]
|
|
110
|
+
): T;
|
|
111
|
+
|
|
112
|
+
export declare function setDefaultValueForUndefined<T extends object>(
|
|
113
|
+
object: T,
|
|
114
|
+
keys: (keyof T)[],
|
|
115
|
+
value?: any,
|
|
116
|
+
): T;
|
|
117
|
+
|
|
118
|
+
export declare function bindWidgetToFunctions(
|
|
119
|
+
widget: Widget,
|
|
120
|
+
target?: any,
|
|
121
|
+
): void;
|
|
122
|
+
|
|
123
|
+
export declare function isFunction(
|
|
124
|
+
value: any,
|
|
125
|
+
): value is (...args: any[]) => any;
|
|
126
|
+
|
|
127
|
+
export declare function isUndefined(value: any): value is undefined;
|
|
128
|
+
|
|
129
|
+
export declare function getMerkur(): Merkur;
|
|
130
|
+
export declare function removeMerkur(): void;
|