chayns-api 2.4.18 → 2.4.20
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.
|
@@ -9,9 +9,9 @@ let current = undefined;
|
|
|
9
9
|
const moduleWrapper = exports.moduleWrapper = {
|
|
10
10
|
get current() {
|
|
11
11
|
if (moduleWrapperStack.length === 0 && !current) {
|
|
12
|
-
throw new Error("No chayns api instance
|
|
12
|
+
throw new Error("No chayns api instance initialized");
|
|
13
13
|
}
|
|
14
|
-
return moduleWrapperStack.
|
|
14
|
+
return moduleWrapperStack.length > 0 ? moduleWrapperStack[moduleWrapperStack.length - 1] : current;
|
|
15
15
|
},
|
|
16
16
|
set current(chayns) {
|
|
17
17
|
current = chayns;
|
|
@@ -3,9 +3,9 @@ let current = undefined;
|
|
|
3
3
|
export const moduleWrapper = {
|
|
4
4
|
get current() {
|
|
5
5
|
if (moduleWrapperStack.length === 0 && !current) {
|
|
6
|
-
throw new Error("No chayns api instance
|
|
6
|
+
throw new Error("No chayns api instance initialized");
|
|
7
7
|
}
|
|
8
|
-
return moduleWrapperStack.
|
|
8
|
+
return moduleWrapperStack.length > 0 ? moduleWrapperStack[moduleWrapperStack.length - 1] : current;
|
|
9
9
|
},
|
|
10
10
|
set current(chayns) {
|
|
11
11
|
current = chayns;
|
|
@@ -273,4 +273,7 @@ export declare const environment: {
|
|
|
273
273
|
buildEnvironment: import("../types/IChaynsReact").Environment;
|
|
274
274
|
runtimeEnvironment: import("../types/IChaynsReact").RuntimeEnviroment | string;
|
|
275
275
|
};
|
|
276
|
+
/**
|
|
277
|
+
* Redirects the user to the given destination. On the server side a 307 or 308 (depending on the isPermanent flag) redirect response is generated. On the client side a window.location.href change is performed.
|
|
278
|
+
*/
|
|
276
279
|
export declare const redirect: (...args: Parameters<ChaynsReactFunctions["redirect"]>) => Promise<void>;
|