lazy() function to load a route definition, which can add non-matching related properties to a route

Type Parameters

  • R extends AgnosticRouteObject
  • Returns Promise<Exclude<{
        [K in string | number | symbol]: K extends Exclude<keyof R, ImmutableRouteKey>
            ? Omit<Omit<R, ImmutableRouteKey>, K<K>> & Required<Pick<Omit<R, ImmutableRouteKey>, K<K>>>
            : never
    }[Exclude<keyof R, ImmutableRouteKey>], undefined>>