Add types to event emitters and clean up connections (#772)

* Event types for controller

* Clean up ctl event emitters

* Event types for server

* Event types for lib

* Remove TypedEventEmitter

* Event types for webui

* Fix compile issues

* Small cleanup of connectors
This commit is contained in:
Cooldude2606 authored and GitHub committed 2025-06-13 22:20:50 +01:00
1 parent 5b56aa3fea
commit 331fc7d947
16 files changed
+182 -157

No files matched your search

+7 -1
View File
@@ -266,6 +266,12 @@ async function uploadExport(req: Request, res: Response) {
res.sendStatus(200);
}
type ProxyStreamEvents = {
"error": [ err: any ],
"close": [],
"timeout": [],
"source": [],
}
export interface ProxyStream {
id: string;
@@ -274,7 +280,7 @@ export interface ProxyStream {
size?: string;
mime?: string;
filename: string | null;
events: events.EventEmitter;
events: events.EventEmitter<ProxyStreamEvents>;
timeout: ReturnType<typeof setTimeout>;
}