forked from MapComplete/MapComplete
Add GetParsed to localStorageSource
This commit is contained in:
parent
3ecfef9bc1
commit
a78e3866e0
2 changed files with 3 additions and 3 deletions
|
@ -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){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue