From d7cd977ce7ed451934ba6dd4f6e9fc634163974b Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Tue, 22 Sep 2020 18:01:04 +0200 Subject: [PATCH] core-api: add back MutableRouteRef for backwards compatibility and export AbsoluteRouteRef --- packages/core-api/src/routing/RouteRef.ts | 5 +++++ packages/core-api/src/routing/index.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/packages/core-api/src/routing/RouteRef.ts b/packages/core-api/src/routing/RouteRef.ts index c8b0855de7..c33335cb38 100644 --- a/packages/core-api/src/routing/RouteRef.ts +++ b/packages/core-api/src/routing/RouteRef.ts @@ -84,3 +84,8 @@ export class AbsoluteRouteRef implements ConcreteRoute { export function createRouteRef(config: RouteRefConfig): AbsoluteRouteRef { return new AbsoluteRouteRef(config); } + +// TODO(Rugvip): Added for backwards compatibility, remove once old usage is gone +// We may want to avoid exporting the AbsoluteRouteRef itself though, and consider +// a different model for how to create sub routes, just avoid this +export type MutableRouteRef = AbsoluteRouteRef; diff --git a/packages/core-api/src/routing/index.ts b/packages/core-api/src/routing/index.ts index 1b80c0838e..29de34ec42 100644 --- a/packages/core-api/src/routing/index.ts +++ b/packages/core-api/src/routing/index.ts @@ -15,4 +15,5 @@ */ export type { RouteRef, RouteRefConfig, ConcreteRoute } from './types'; +export type { MutableRouteRef, AbsoluteRouteRef } from './RouteRef'; export { createRouteRef } from './RouteRef';