tarsinzer / routerkit

🦩 strict typed angular routes
MIT License
76 stars 8 forks source link

Properly escape nested route parameters #275

Open Den-dp opened 1 year ago

Den-dp commented 1 year ago

Description of the problem

Nested route params cause the following issue:

import { TypedRoute } from '@routerkit/core';
export type TypedRoutes = {
    [company: string]: {
        :project: TypedRoute<[  //<-- syntax error here
            '/',
            string,
            string
        ]>;
    };
};

Steps To Reproduce

Add the following route and run ng g @routerkit/core:parse --project APP_NAME

const routes: Routes = [
  { path: ':company/:project', component: SomeComponent },
];

Versions: