Skip to content

Commit c4a4e05

Browse files
Add support to additional route attributes (#164)
1 parent a45eb46 commit c4a4e05

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/common/types.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,11 @@ export type InvariantRoute = {
234234
query?: string[];
235235
};
236236

237+
/**
238+
* Custom additional attributes that may be present in each route definition.
239+
*/
240+
interface AdditionalRouteAttributes {}
241+
237242
export type Route = InvariantRoute & {
238243
/** The component to render on match, typed explicitly */
239244
component: ComponentType<RouteContext>;
@@ -242,7 +247,7 @@ export type Route = InvariantRoute & {
242247
* The resources for the route
243248
*/
244249
resources?: RouteResources;
245-
};
250+
} & AdditionalRouteAttributes;
246251

247252
export type HistoryAction = 'PUSH' | 'REPLACE' | 'POP' | '';
248253

0 commit comments

Comments
 (0)