From c05c8e6667c702ebca99899fa88f4c4d577ec80d Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Mon, 9 Jun 2025 00:11:15 +0700 Subject: [PATCH] feat(lib): improve route type safety --- libs/common/src/lib/routes.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libs/common/src/lib/routes.ts b/libs/common/src/lib/routes.ts index bf4b40fee..c85ade1d3 100644 --- a/libs/common/src/lib/routes.ts +++ b/libs/common/src/lib/routes.ts @@ -1,5 +1,13 @@ import '@angular/localize/init'; +export interface IRoute { + excludeFromAssistant?: boolean; + path: string; + routerLink: string[]; + subRoutes?: Record; + title: string; +} + export const routes = { access: 'access', account: 'account', @@ -44,7 +52,7 @@ export const routes = { termsOfService: $localize`:kebab-case:terms-of-service` }; -export const internalRoutes = { +export const internalRoutes: Record = { accounts: { path: 'accounts', routerLink: ['/accounts'],