api: init notification queue
This commit is contained in:
9
pkgs/clan-app/ui/index.d.ts
vendored
Normal file
9
pkgs/clan-app/ui/index.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { ProcessMessage } from "./src/hooks/api";
|
||||
|
||||
export {};
|
||||
|
||||
declare global {
|
||||
interface Window {
|
||||
notifyBus: (data: ProcessMessage) => void;
|
||||
}
|
||||
}
|
||||
@@ -99,3 +99,14 @@ export const callApi = <K extends OperationNames>(
|
||||
},
|
||||
};
|
||||
};
|
||||
|
||||
export interface ProcessMessage {
|
||||
topic: string;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
data: any;
|
||||
origin: string | null;
|
||||
}
|
||||
|
||||
window.notifyBus = (data) => {
|
||||
console.debug("Channel function called with data:", data);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user