[MessageBus] explicit return type for getData
This commit is contained in:
parent
e9f1d3991d
commit
a6dfd45299
@ -737,12 +737,12 @@ export default class MessageBus {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public getData(processId: string, stateId: string): Promise<any> {
|
public getData(processId: string, stateId: string): Promise<{ [key: string]: any }> {
|
||||||
return new Promise<any>((resolve: (data: any) => void, reject: (error: string) => void) => {
|
return new Promise<{ [key: string]: any }>((resolve: (data: { [key: string]: any }) => void, reject: (error: string) => void) => {
|
||||||
this.checkToken().then(() => {
|
this.checkToken().then(() => {
|
||||||
const messageId = `DATA_RETRIEVED_${uuidv4()}`;
|
const messageId = `DATA_RETRIEVED_${uuidv4()}`;
|
||||||
|
|
||||||
const unsubscribe = EventBus.getInstance().on('DATA_RETRIEVED', (responseId: string, data: any) => {
|
const unsubscribe = EventBus.getInstance().on('DATA_RETRIEVED', (responseId: string, data: { [key: string]: any }) => {
|
||||||
if (responseId !== messageId) {
|
if (responseId !== messageId) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user