This commit is contained in:
sli97 2022-12-15 16:19:00 +08:00
parent 3b17c31857
commit 5628b0403e

View File

@ -57,7 +57,7 @@ export class MyServer extends EventEmitter {
}) })
} }
setApi<T extends keyof IModel["api"]>(name: T, cb: (connection: Connection, args: IModel["api"][T]["res"]) => void) { setApi<T extends keyof IModel["api"]>(name: T, cb: (connection: Connection, args: IModel["api"][T]["req"]) => IModel["api"][T]["res"]) {
this.apiMap.set(name, cb) this.apiMap.set(name, cb)
} }
} }