From a336623f3ac8cbf8bcf0bb86df8f6e1a563571ea Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Wed, 2 Mar 2022 17:57:03 +0530 Subject: [PATCH] Generic parameter should extend object --- src/domain/navigation/Navigation.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/domain/navigation/Navigation.ts b/src/domain/navigation/Navigation.ts index d6ffa3c5..c786d7a7 100644 --- a/src/domain/navigation/Navigation.ts +++ b/src/domain/navigation/Navigation.ts @@ -21,7 +21,7 @@ type AllowsChild = (parent: Segment | undefined, child: Segment) => boo export type OptionalValue = T extends true? [(undefined | true)?]: [T]; -export class Navigation { +export class Navigation { private readonly _allowsChild: AllowsChild; private _path: Path; private readonly _observables: Map> = new Map(); @@ -189,7 +189,7 @@ class Path { * custom observable so it always returns what is in navigation.path, even if we haven't emitted the change yet. * This ensures that observers of a segment can also read the most recent value of other segments. */ -class SegmentObservable extends BaseObservableValue { +class SegmentObservable extends BaseObservableValue { private readonly _navigation: Navigation; private _type: keyof T; private _lastSetValue?: T[keyof T];