Tweak some typescript things

This commit is contained in:
Jonathan Staab
2023-09-20 10:28:15 -07:00
parent 7c9039704c
commit 25adcc71ef
9 changed files with 689 additions and 39 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ export class Pool extends Emitter {
has(url: string) {
return this.data.has(url)
}
get(url: string, {autoConnect = true, reconnectAfter = 3000} = {}) {
get(url: string, {autoConnect = true, reconnectAfter = 3000} = {}): Connection {
let connection = this.data.get(url)
if (autoConnect) {
@@ -30,7 +30,7 @@ export class Pool extends Emitter {
})
}
return connection
return connection!
}
remove(url: string) {
const connection = this.data.get(url)