optional type specification
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user