mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-11 04:27:40 +01:00
Add missing type
This commit is contained in:
parent
61ce2f9e3d
commit
e07abfa02a
@ -58,9 +58,9 @@ export class ViewModel<O extends Options = Options> extends EventEmitter<{change
|
|||||||
return this._options[name];
|
return this._options[name];
|
||||||
}
|
}
|
||||||
|
|
||||||
observeNavigation(type: string, onChange: (value: true | string, type: string) => void) {
|
observeNavigation(type: string, onChange: (value: string | true | undefined, type: string) => void) {
|
||||||
const segmentObservable = this.navigation.observe(type);
|
const segmentObservable = this.navigation.observe(type);
|
||||||
const unsubscribe = segmentObservable.subscribe((value: true | string) => {
|
const unsubscribe = segmentObservable.subscribe((value: string | true | undefined) => {
|
||||||
onChange(value, type);
|
onChange(value, type);
|
||||||
})
|
})
|
||||||
this.track(unsubscribe);
|
this.track(unsubscribe);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user