@modern-js/types 3.11.2 → 3.12.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/cli/index.d.ts +7 -0
- package/package.json +1 -1
- package/server/devServer.d.ts +1 -1
- package/server/hook.d.ts +1 -5
- package/server/utils.d.ts +1 -1
package/cli/index.d.ts
CHANGED
|
@@ -64,6 +64,8 @@ export interface NestedRoute<T = string | (() => JSX.Element)> extends Route {
|
|
|
64
64
|
routeType?: 'page' | 'layout';
|
|
65
65
|
parentId?: string;
|
|
66
66
|
data?: string;
|
|
67
|
+
/** Data module exporting the build-time SSG parameter generator. */
|
|
68
|
+
ssgParams?: string;
|
|
67
69
|
clientData?: string;
|
|
68
70
|
children?: NestedRoute<T>[];
|
|
69
71
|
filename?: string;
|
|
@@ -108,6 +110,11 @@ export type SSGRouteOptions =
|
|
|
108
110
|
headers?: Record<string, any>;
|
|
109
111
|
};
|
|
110
112
|
|
|
113
|
+
/** Generate complete parameter combinations for one page during SSG. */
|
|
114
|
+
export type SSGParams = () =>
|
|
115
|
+
| Record<string, string | undefined>[]
|
|
116
|
+
| Promise<Record<string, string | undefined>[]>;
|
|
117
|
+
|
|
111
118
|
export type SSGSingleEntryOptions =
|
|
112
119
|
| boolean
|
|
113
120
|
| {
|
package/package.json
CHANGED
package/server/devServer.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NodeRequest, NodeResponse } from '@modern-js/server-core/node';
|
|
2
|
-
import type {
|
|
2
|
+
import type { NextFunction } from './utils';
|
|
3
3
|
|
|
4
4
|
export type DevServerHttpsOptions = boolean | { key: string; cert: string };
|
|
5
5
|
|
package/server/hook.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
IncomingHttpHeaders,
|
|
3
|
-
IncomingMessage,
|
|
4
|
-
ServerResponse,
|
|
5
|
-
} from 'http';
|
|
1
|
+
import type { IncomingHttpHeaders } from 'http';
|
|
6
2
|
import type { ServerRoute } from './route';
|
|
7
3
|
import type { NodeRequest, NodeResponse } from './server';
|
|
8
4
|
import type { Logger, Metrics, Reporter } from './utils';
|
package/server/utils.d.ts
CHANGED