mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Use subtype instead of whole SegmentType
This commit is contained in:
parent
e7f4ce6175
commit
5be00f051f
@ -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>;
|
||||
|
Loading…
Reference in New Issue
Block a user