Blame view

天文台pc/tianwentai-ui/node_modules/react-router/dist/development/register-CS_tiXsm.d.mts 1.11 KB
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  import { R as RouteModule } from './router-5iOvts3c.mjs';
  
  /**
   * Apps can use this interface to "register" app-wide types for React Router via interface declaration merging and module augmentation.
   * React Router should handle this for you via type generation.
   *
   * For more on declaration merging and module augmentation, see https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation .
   */
  interface Register {
  }
  type AnyParams = Record<string, string | undefined>;
  type AnyPages = Record<string, {
      params: AnyParams;
  }>;
  type Pages = Register extends {
      pages: infer Registered extends AnyPages;
  } ? Registered : AnyPages;
  type AnyRouteFiles = Record<string, {
      id: string;
      page: string;
  }>;
  type RouteFiles = Register extends {
      routeFiles: infer Registered extends AnyRouteFiles;
  } ? Registered : AnyRouteFiles;
  type AnyRouteModules = Record<string, RouteModule>;
  type RouteModules = Register extends {
      routeModules: infer Registered extends AnyRouteModules;
  } ? Registered : AnyRouteModules;
  
  export type { Pages as P, RouteFiles as R, RouteModules as a, Register as b };