Fixing "has/in" on variables proxy object
When using WA.state, using `"myVariable" in WA.state` would always return false. This is now fixed by adding a "has" method on the Proxy class. Also, added a `WA.state.hasVariable` method.
This commit is contained in:
@@ -9,6 +9,7 @@ Moreover, `WA.state` functions can be used to persist this state across reloads.
|
||||
```
|
||||
WA.state.saveVariable(key : string, data : unknown): void
|
||||
WA.state.loadVariable(key : string) : unknown
|
||||
WA.state.hasVariable(key : string) : boolean
|
||||
WA.state.onVariableChange(key : string).subscribe((data: unknown) => {}) : Subscription
|
||||
WA.state.[any property]: unknown
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user