mirror of
https://github.com/zoriya/flood.git
synced 2026-06-04 19:36:42 +00:00
dependencies: bump (major)
TODO: drop the "const argv = argvObj as Record<string, any>;" hack Refs: yargs/yargs#2175
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import type {EventMap} from 'typed-emitter';
|
||||
import type {Operation} from 'fast-json-patch';
|
||||
import type {Request, Response} from 'express';
|
||||
import type TypedEmitter from 'typed-emitter';
|
||||
@@ -21,7 +22,7 @@ export default async (req: Request, res: Response) => {
|
||||
const fetchTorrentList = serviceInstances.torrentService.fetchTorrentList();
|
||||
|
||||
// Hook into events and stop listening when connection is closed
|
||||
const handleEvents = <T extends TypedEmitter<Record<string, unknown>>>(
|
||||
const handleEvents = <T extends TypedEmitter<EventMap>>(
|
||||
emitter: T,
|
||||
event: Parameters<T['on']>[0],
|
||||
handler: Parameters<T['on']>[1],
|
||||
|
||||
Reference in New Issue
Block a user