1
0
Fork 0
mirror of https://git.sr.ht/~cadence/cloudtube synced 2026-05-26 12:32:25 +00:00

Make VSCode type detection happier

This commit is contained in:
Cadence Ember 2021-05-11 21:27:57 +12:00
parent cd7969973b
commit ec9b0edadc
No known key found for this signature in database
GPG key ID: BC1C2C61CF521B17
7 changed files with 13 additions and 1 deletions

View file

@ -31,6 +31,7 @@ class User {
this.token = token
}
/** @return {{instance?: string, save_history?: boolean, local?: boolean, quality?: number}} */
getSettings() {
if (this.token) {
return db.prepare("SELECT * FROM Settings WHERE token = ?").get(this.token) || {}
@ -39,6 +40,7 @@ class User {
}
}
/** @return {{instance?: string, save_history?: boolean, local?: boolean, quality?: number}} */
getSettingsOrDefaults() {
const settings = this.getSettings()
for (const key of Object.keys(constants.user_settings)) {