@modern-js/types 2.58.1 → 2.58.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.
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.58.
|
|
18
|
+
"version": "2.58.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.58.
|
|
49
|
-
"@scripts/jest-config": "2.58.
|
|
48
|
+
"@scripts/build": "2.58.2",
|
|
49
|
+
"@scripts/jest-config": "2.58.2"
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": false,
|
|
52
52
|
"publishConfig": {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
2
1
|
interface REACT_STATICS {
|
|
3
2
|
childContextTypes: true;
|
|
4
3
|
contextType: true;
|
|
@@ -13,7 +12,6 @@ interface REACT_STATICS {
|
|
|
13
12
|
type: true;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
17
15
|
interface KNOWN_STATICS {
|
|
18
16
|
name: true;
|
|
19
17
|
length: true;
|
|
@@ -24,7 +22,6 @@ interface KNOWN_STATICS {
|
|
|
24
22
|
arity: true;
|
|
25
23
|
}
|
|
26
24
|
|
|
27
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
28
25
|
interface MEMO_STATICS {
|
|
29
26
|
$$typeof: true;
|
|
30
27
|
compare: true;
|
|
@@ -34,7 +31,6 @@ interface MEMO_STATICS {
|
|
|
34
31
|
type: true;
|
|
35
32
|
}
|
|
36
33
|
|
|
37
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
38
34
|
interface FORWARD_REF_STATICS {
|
|
39
35
|
$$typeof: true;
|
|
40
36
|
render: true;
|
|
@@ -47,7 +43,6 @@ declare namespace hoistNonReactStatics {
|
|
|
47
43
|
S extends React.ComponentType<any>,
|
|
48
44
|
C extends {
|
|
49
45
|
[key: string]: true;
|
|
50
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
51
46
|
} = {},
|
|
52
47
|
> = {
|
|
53
48
|
[key in Exclude<
|
|
@@ -55,8 +50,8 @@ declare namespace hoistNonReactStatics {
|
|
|
55
50
|
S extends React.MemoExoticComponent<any>
|
|
56
51
|
? keyof MEMO_STATICS | keyof C
|
|
57
52
|
: S extends React.ForwardRefExoticComponent<any>
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
? keyof FORWARD_REF_STATICS | keyof C
|
|
54
|
+
: keyof REACT_STATICS | keyof KNOWN_STATICS | keyof C
|
|
60
55
|
>]: S[key];
|
|
61
56
|
};
|
|
62
57
|
}
|
|
@@ -66,7 +61,6 @@ declare module 'hoist-non-react-statics' {
|
|
|
66
61
|
S extends React.ComponentType<any>,
|
|
67
62
|
C extends {
|
|
68
63
|
[key: string]: true;
|
|
69
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
70
64
|
} = {},
|
|
71
65
|
>(
|
|
72
66
|
TargetComponent: T,
|
package/server/context.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
IncomingMessage,
|
|
3
3
|
ServerResponse,
|
|
4
4
|
IncomingHttpHeaders,
|
|
5
5
|
Server as HttpServer,
|
|
6
6
|
} from 'http';
|
|
7
|
-
import qs from 'querystring';
|
|
7
|
+
import type qs from 'querystring';
|
|
8
8
|
import type { SSRMode } from 'common';
|
|
9
|
-
import { Metrics, Logger, Reporter, ServerTiming } from './utils';
|
|
9
|
+
import type { Metrics, Logger, Reporter, ServerTiming } from './utils';
|
|
10
10
|
|
|
11
11
|
export interface RequestPayload {
|
|
12
12
|
[key: string]: unknown;
|
package/server/hook.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type {
|
|
2
|
+
IncomingMessage,
|
|
3
|
+
ServerResponse,
|
|
4
|
+
IncomingHttpHeaders,
|
|
5
|
+
} from 'http';
|
|
6
|
+
import type { Reporter } from './utils';
|
|
7
|
+
import type { ServerRoute } from './route';
|
|
4
8
|
|
|
5
9
|
export type CookieAPI = {
|
|
6
10
|
/**
|
package/server/middleware.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { RequestPayload } from './context';
|
|
1
|
+
import type { RequestPayload } from './context';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
type Set<V extends Record<string>> = <Key extends keyof V>(
|
|
4
|
+
key: Key,
|
|
5
|
+
value: V[Key],
|
|
6
|
+
) => void;
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
8
|
+
type Get<V extends Record<string, unknown>> = <Key extends keyof V>(
|
|
9
|
+
key: Key,
|
|
10
|
+
) => V[Key];
|
|
12
11
|
|
|
13
12
|
type Body = ReadableStream | ArrayBuffer | string | null;
|
|
14
13
|
|
package/server/monitor.d.ts
CHANGED