improve getUserClient in typescript

This commit is contained in:
Ruben Fiszel
2024-03-26 18:53:18 +01:00
parent 703c11891a
commit ab53dd5b76
+2 -4
View File
@@ -332,7 +332,6 @@ export async function setState(state: any): Promise<void> {
await setResource(state, undefined, "state");
}
/**
* Set a flow user state
* @param key key of the state
@@ -370,11 +369,11 @@ export async function setFlowUserState(
export async function getFlowUserState(
key: string,
errorIfNotPossible?: boolean
): Promise<void> {
): Promise<any> {
!clientSet && setClient();
const workspace = getWorkspace();
try {
await JobService.getFlowUserState({
return await JobService.getFlowUserState({
workspace,
id: await getRootJobId(),
key,
@@ -388,7 +387,6 @@ export async function getFlowUserState(
}
}
// /**
// * Set the shared state
// * @param state state to set