@modern-js/types 2.56.0 → 2.56.2

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.
Files changed (2) hide show
  1. package/cli/index.d.ts +37 -46
  2. package/package.json +3 -3
package/cli/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- import type { Merge } from 'type-fest';
2
-
3
1
  import type { Config as JestConfigTypes } from '@jest/types';
4
2
 
5
3
  export type JestConfig = JestConfigTypes.Config;
@@ -64,54 +62,47 @@ export type RouteLegacy = {
64
62
  parent?: RouteLegacy;
65
63
  };
66
64
 
67
- export type Route = Partial<{
68
- caseSensitive: boolean;
69
- path: string;
70
- id: string;
71
- loader: any;
72
- action: any;
73
- hasErrorBoundary: boolean;
74
- shouldRevalidate: any;
75
- handle: any;
76
- index: boolean;
77
- children: Route[] | undefined;
78
- element: React.ReactNode | null;
79
- errorElement: React.ReactNode | null;
80
- }> & {
65
+ export interface Route {
66
+ caseSensitive?: boolean;
67
+ path?: string;
68
+ id?: string;
69
+ loader?: any;
70
+ action?: any;
71
+ hasErrorBoundary?: boolean;
72
+ shouldRevalidate?: any;
73
+ handle?: any;
74
+ index?: boolean;
75
+ children?: Route[] | undefined;
76
+ element?: React.ReactNode | null;
77
+ errorElement?: React.ReactNode | null;
81
78
  type: string;
82
- };
79
+ }
83
80
 
84
81
  export type NestedRouteForCli = NestedRoute<string>;
85
82
 
86
- export type NestedRoute<T = string | (() => JSX.Element)> = Merge<
87
- Route,
88
- {
89
- type: 'nested';
90
- parentId?: string;
91
- data?: string;
92
- clientData?: string;
93
- children?: NestedRoute<T>[];
94
- filename?: string;
95
- _component?: string;
96
- component?: T;
97
- lazyImport?: () => Promise<any>;
98
- loading?: T;
99
- error?: T;
100
- isRoot?: boolean;
101
- config?: string | Record<string, any>;
102
- }
103
- >;
104
-
105
- export type PageRoute = Merge<
106
- Route,
107
- {
108
- type: 'page';
109
- parent?: PageRoute;
110
- _component: string;
111
- component: string;
112
- children?: PageRoute[];
113
- }
114
- >;
83
+ export interface NestedRoute<T = string | (() => JSX.Element)> extends Route {
84
+ type: 'nested';
85
+ parentId?: string;
86
+ data?: string;
87
+ clientData?: string;
88
+ children?: NestedRoute<T>[];
89
+ filename?: string;
90
+ _component?: string;
91
+ component?: T;
92
+ lazyImport?: () => Promise<any>;
93
+ loading?: T;
94
+ error?: T;
95
+ isRoot?: boolean;
96
+ config?: string | Record<string, any>;
97
+ }
98
+
99
+ export interface PageRoute extends Route {
100
+ type: 'page';
101
+ parent?: PageRoute;
102
+ _component: string;
103
+ component: string;
104
+ children?: PageRoute[];
105
+ }
115
106
 
116
107
  /**
117
108
  * custom html partials.
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.56.0",
18
+ "version": "2.56.2",
19
19
  "types": "./index.d.ts",
20
20
  "exports": {
21
21
  ".": {
@@ -45,8 +45,8 @@
45
45
  "http-proxy-middleware": "^2.0.4",
46
46
  "jest": "^29",
47
47
  "type-fest": "2.15.0",
48
- "@scripts/build": "2.56.0",
49
- "@scripts/jest-config": "2.56.0"
48
+ "@scripts/build": "2.56.2",
49
+ "@scripts/jest-config": "2.56.2"
50
50
  },
51
51
  "sideEffects": false,
52
52
  "publishConfig": {