@xn-lib/core 0.0.1 → 0.0.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.
- package/dist/index.d.ts +17 -0
- package/package.json +2 -2
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare class EventBus {
|
|
2
|
+
private events;
|
|
3
|
+
on(event: string, handler: EventHandler): void;
|
|
4
|
+
off(event: string, handler: EventHandler): void;
|
|
5
|
+
emit(event: string, ...args: any[]): void;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
declare type EventHandler = (...args: any[]) => void;
|
|
9
|
+
|
|
10
|
+
export declare class Store<T extends Record<string, any>> {
|
|
11
|
+
private state;
|
|
12
|
+
constructor(initialState: T);
|
|
13
|
+
getState(): T;
|
|
14
|
+
setState(newState: Partial<T>): void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xn-lib/core",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "XN core functionality",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@xn-lib/base": "^0.0.
|
|
33
|
+
"@xn-lib/base": "^0.0.2"
|
|
34
34
|
}
|
|
35
35
|
}
|