core-api: add back MutableRouteRef for backwards compatibility and export AbsoluteRouteRef

This commit is contained in:
Patrik Oldsberg
2020-09-22 18:01:04 +02:00
parent 8804c5e338
commit d7cd977ce7
2 changed files with 6 additions and 0 deletions
@@ -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;
+1
View File
@@ -15,4 +15,5 @@
*/
export type { RouteRef, RouteRefConfig, ConcreteRoute } from './types';
export type { MutableRouteRef, AbsoluteRouteRef } from './RouteRef';
export { createRouteRef } from './RouteRef';