(setting)
| 335 | } |
| 336 | |
| 337 | async reset(setting) { |
| 338 | if (setting) { |
| 339 | if (setting in this.#defaultSettings) { |
| 340 | this.value[setting] = this.#defaultSettings[setting]; |
| 341 | await this.update(); |
| 342 | } else { |
| 343 | return false; |
| 344 | } |
| 345 | } else { |
| 346 | this.value = this.#defaultSettings; |
| 347 | await this.update(false); |
| 348 | } |
| 349 | |
| 350 | this.#on.reset.forEach((onreset) => onreset(this.value)); |
| 351 | } |
| 352 | |
| 353 | /** |
| 354 | * Adds a listener for the given event |
no test coverage detected