Use subtype instead of whole SegmentType

This commit is contained in:
RMidhunSuresh 2022-02-22 16:39:33 +05:30
parent e7f4ce6175
commit 5be00f051f
1 changed files with 1 additions and 2 deletions

View File

@ -17,12 +17,11 @@ limitations under the License.
import type {History} from "../../platform/web/dom/History.js";
import type {Navigation, Segment, Path, OptionalValue} from "./Navigation";
import type {SubscriptionHandle} from "../../observable/BaseObservable";
import type {SegmentType} from "./index";
type ParseURLPath<T> = (urlPath: string, currentNavPath: Path<T>, defaultSessionId?: string) => Segment<T>[];
type StringifyPath<T> = (path: Path<T>) => string;
export class URLRouter<T extends SegmentType> {
export class URLRouter<T extends {session: string}> {
private readonly _history: History;
private readonly _navigation: Navigation<T>;
private readonly _parseUrlPath: ParseURLPath<T>;