@remix-run/router 1.19.2 → 1.20.0-pre.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/utils.ts CHANGED
@@ -255,15 +255,21 @@ export interface DataStrategyFunction {
255
255
  (args: DataStrategyFunctionArgs): Promise<Record<string, DataStrategyResult>>;
256
256
  }
257
257
 
258
- export interface AgnosticPatchRoutesOnNavigationFunction<
258
+ export type AgnosticPatchRoutesOnNavigationFunctionArgs<
259
+ O extends AgnosticRouteObject = AgnosticRouteObject,
259
260
  M extends AgnosticRouteMatch = AgnosticRouteMatch
260
- > {
261
- (opts: {
262
- path: string;
263
- matches: M[];
264
- patch: (routeId: string | null, children: AgnosticRouteObject[]) => void;
265
- }): void | Promise<void>;
266
- }
261
+ > = {
262
+ path: string;
263
+ matches: M[];
264
+ patch: (routeId: string | null, children: O[]) => void;
265
+ };
266
+
267
+ export type AgnosticPatchRoutesOnNavigationFunction<
268
+ O extends AgnosticRouteObject = AgnosticRouteObject,
269
+ M extends AgnosticRouteMatch = AgnosticRouteMatch
270
+ > = (
271
+ opts: AgnosticPatchRoutesOnNavigationFunctionArgs<O, M>
272
+ ) => void | Promise<void>;
267
273
 
268
274
  /**
269
275
  * Function provided by the framework-aware layers to set any framework-specific