Add GetParsed to localStorageSource

This commit is contained in:
Pieter Vander Vennet 2021-07-11 12:52:33 +02:00
parent 3ecfef9bc1
commit a78e3866e0
2 changed files with 3 additions and 3 deletions

View file

@ -5,7 +5,7 @@ import {UIEventSource} from "../UIEventSource";
*/
export class LocalStorageSource {
static GetParsed(key: string, defaultValue : any){
static GetParsed<T>(key: string, defaultValue : T) : UIEventSource<T>{
return LocalStorageSource.Get(key).map(
str => {
if(str === undefined){