forked from mystiq/hydrogen-web
Add missing type
This commit is contained in:
parent
61ce2f9e3d
commit
e07abfa02a
1 changed files with 2 additions and 2 deletions
|
@ -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…
Reference in a new issue