@openmrs/esm-context 6.3.1-pre.3099 → 6.3.1-pre.3104
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/.turbo/turbo-build.log +1 -1
- package/dist/context.d.ts +6 -0
- package/package.json +3 -3
- package/src/context.ts +6 -0
package/.turbo/turbo-build.log
CHANGED
package/dist/context.d.ts
CHANGED
|
@@ -20,6 +20,12 @@ export declare function registerContext<T extends {} = {}>(namespace: string, in
|
|
|
20
20
|
* will remove the namespace and all associated data.
|
|
21
21
|
*/
|
|
22
22
|
export declare function unregisterContext(namespace: string): void;
|
|
23
|
+
/**
|
|
24
|
+
* Returns an _immutable_ version of the state of the namespace as it is currently
|
|
25
|
+
*
|
|
26
|
+
* @typeParam T The type of the value stored in the namespace
|
|
27
|
+
* @param namespace The namespace to load properties from
|
|
28
|
+
*/
|
|
23
29
|
export declare function getContext<T extends {} = {}>(namespace: string): Readonly<T> | null;
|
|
24
30
|
/**
|
|
25
31
|
* Updates a namespace in the global context. If the namespace does not exist, it is registered.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openmrs/esm-context",
|
|
3
|
-
"version": "6.3.1-pre.
|
|
3
|
+
"version": "6.3.1-pre.3104",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Utilities for managing the current execution context",
|
|
6
6
|
"type": "module",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"@openmrs/esm-state": "6.x"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@openmrs/esm-globals": "6.3.1-pre.
|
|
57
|
-
"@openmrs/esm-state": "6.3.1-pre.
|
|
56
|
+
"@openmrs/esm-globals": "6.3.1-pre.3104",
|
|
57
|
+
"@openmrs/esm-state": "6.3.1-pre.3104",
|
|
58
58
|
"@swc/cli": "^0.7.7",
|
|
59
59
|
"@swc/core": "^1.11.29",
|
|
60
60
|
"concurrently": "^9.1.2",
|
package/src/context.ts
CHANGED
|
@@ -51,6 +51,12 @@ export function unregisterContext(namespace: string) {
|
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/**
|
|
55
|
+
* Returns an _immutable_ version of the state of the namespace as it is currently
|
|
56
|
+
*
|
|
57
|
+
* @typeParam T The type of the value stored in the namespace
|
|
58
|
+
* @param namespace The namespace to load properties from
|
|
59
|
+
*/
|
|
54
60
|
export function getContext<T extends {} = {}>(namespace: string): Readonly<T> | null;
|
|
55
61
|
/**
|
|
56
62
|
* Returns an _immutable_ version of the state of the namespace as it is currently
|