Archived
2
0

typescript catch error any.

This commit is contained in:
Miroslav Šedivý 2021-08-31 18:25:06 +02:00
parent 81006e02ed
commit 9be75c20ca
5 changed files with 7 additions and 7 deletions

View File

@ -154,7 +154,7 @@
context: 'github/gollum', context: 'github/gollum',
}) })
this.$accessor.client.setAbout(res2.data) this.$accessor.client.setAbout(res2.data)
} catch (err) { } catch (err: any) {
console.error(err) console.error(err)
} finally { } finally {
this.loading = false this.loading = false

View File

@ -490,7 +490,7 @@
try { try {
await this._video.play() await this._video.play()
this.onResise() this.onResise()
} catch (err) { } catch (err: any) {
this.$log.error(err) this.$log.error(err)
} }
} }
@ -577,7 +577,7 @@
this.$accessor.remote.setClipboard(text) this.$accessor.remote.setClipboard(text)
this.$accessor.remote.sendClipboard(text) this.$accessor.remote.sendClipboard(text)
} }
} catch (err) { } catch (err: any) {
this.$log.error(err) this.$log.error(err)
} }
} }

View File

@ -62,7 +62,7 @@ export abstract class BaseClient extends EventEmitter<BaseEvents> {
this._ws.onerror = (event) => this.onError.bind(this) this._ws.onerror = (event) => this.onError.bind(this)
this._ws.onclose = (event) => this.onDisconnected.bind(this, new Error('websocket closed')) this._ws.onclose = (event) => this.onDisconnected.bind(this, new Error('websocket closed'))
this._timeout = window.setTimeout(this.onTimeout.bind(this), 15000) this._timeout = window.setTimeout(this.onTimeout.bind(this), 15000)
} catch (err) { } catch (err: any) {
this.onDisconnected(err) this.onDisconnected(err)
} }
} }
@ -269,7 +269,7 @@ export abstract class BaseClient extends EventEmitter<BaseEvents> {
displayname: this._displayname, displayname: this._displayname,
}), }),
) )
} catch (err) { } catch (err: any) {
this.emit('error', err) this.emit('error', err)
} }
} }

View File

@ -66,7 +66,7 @@ export const actions = actionTree(
} }
accessor.emoji.setList(req.data.list) accessor.emoji.setList(req.data.list)
accessor.emoji.setKeywords(req.data.keywords) accessor.emoji.setKeywords(req.data.keywords)
} catch (err) { } catch (err: any) {
console.error(err) console.error(err)
} }
}, },

View File

@ -74,7 +74,7 @@ export const actions = actionTree(
try { try {
const req = await $http.get<KeyboardLayouts>('keyboard_layouts.json') const req = await $http.get<KeyboardLayouts>('keyboard_layouts.json')
accessor.settings.setKeyboardLayoutsList(req.data) accessor.settings.setKeyboardLayoutsList(req.data)
} catch (err) { } catch (err: any) {
console.error(err) console.error(err)
} }
}, },