[MessageBus] explicit return type for getData

This commit is contained in:
Sosthene 2025-09-11 09:05:52 +02:00
parent e9f1d3991d
commit a6dfd45299

View File

@ -737,12 +737,12 @@ export default class MessageBus {
});
}
public getData(processId: string, stateId: string): Promise<any> {
return new Promise<any>((resolve: (data: any) => void, reject: (error: string) => void) => {
public getData(processId: string, stateId: string): Promise<{ [key: string]: any }> {
return new Promise<{ [key: string]: any }>((resolve: (data: { [key: string]: any }) => void, reject: (error: string) => void) => {
this.checkToken().then(() => {
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) {
return;
}