lazy() 函数用于加载路由定义,它可以向路由添加不匹配的相关属性

类型参数

  • 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>>