optional type specification

This commit is contained in:
2022-05-26 20:40:16 -05:00
parent c82ed9cff8
commit 61fd30003d

View File

@@ -23,7 +23,7 @@ export class StorageBase {
return this.val.get() return this.val.get()
} }
getJson<T extends JSONObject>(): T { getJson<T = JSONObject>(): T {
let val let val
try { try {
val = JSON.parse(this.val.get()) val = JSON.parse(this.val.get())