optional type specification

This commit is contained in:
2022-05-26 20:39:14 -05:00
parent be1750944c
commit c82ed9cff8

View File

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