optional type specification

This commit is contained in:
2022-05-26 20:39:14 -05:00
parent be1750944c
commit c82ed9cff8
+1 -1
View File
@@ -23,7 +23,7 @@ export class StorageBase {
return this.val.get() return this.val.get()
} }
getJson(): JSONObject { getJson<T extends JSONObject>(): T {
let val let val
try { try {
val = JSON.parse(this.val.get()) val = JSON.parse(this.val.get())