@docusaurus/module-type-aliases 3.6.3 → 3.7.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/package.json +4 -4
- package/src/index.d.ts +27 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/module-type-aliases",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"description": "Docusaurus module type aliases.",
|
|
5
5
|
"types": "./src/index.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"directory": "packages/docusaurus-module-type-aliases"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@docusaurus/types": "3.
|
|
15
|
+
"@docusaurus/types": "3.7.0",
|
|
16
16
|
"@types/history": "^4.7.11",
|
|
17
17
|
"@types/react": "*",
|
|
18
18
|
"@types/react-router-config": "*",
|
|
19
19
|
"@types/react-router-dom": "*",
|
|
20
|
-
"react-helmet-async": "
|
|
20
|
+
"react-helmet-async": "npm:@slorber/react-helmet-async@*",
|
|
21
21
|
"react-loadable": "npm:@docusaurus/react-loadable@6.0.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
@@ -25,5 +25,5 @@
|
|
|
25
25
|
"react-dom": "*"
|
|
26
26
|
},
|
|
27
27
|
"license": "MIT",
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "dd59750c16fe6908a26f18806a54d4c3dbe6db43"
|
|
29
29
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -84,10 +84,11 @@ declare module '@theme-original/*';
|
|
|
84
84
|
declare module '@theme-init/*';
|
|
85
85
|
|
|
86
86
|
declare module '@theme/Error' {
|
|
87
|
+
import type {ReactNode} from 'react';
|
|
87
88
|
import type {FallbackParams} from '@docusaurus/ErrorBoundary';
|
|
88
89
|
|
|
89
90
|
export interface Props extends FallbackParams {}
|
|
90
|
-
export default function Error(props: Props):
|
|
91
|
+
export default function Error(props: Props): ReactNode;
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
declare module '@theme/Layout' {
|
|
@@ -96,17 +97,20 @@ declare module '@theme/Layout' {
|
|
|
96
97
|
export interface Props {
|
|
97
98
|
readonly children?: ReactNode;
|
|
98
99
|
}
|
|
99
|
-
export default function Layout(props: Props):
|
|
100
|
+
export default function Layout(props: Props): ReactNode;
|
|
100
101
|
}
|
|
101
102
|
|
|
102
103
|
declare module '@theme/Loading' {
|
|
104
|
+
import type {ReactNode} from 'react';
|
|
103
105
|
import type {LoadingComponentProps} from 'react-loadable';
|
|
104
106
|
|
|
105
|
-
export default function Loading(props: LoadingComponentProps):
|
|
107
|
+
export default function Loading(props: LoadingComponentProps): ReactNode;
|
|
106
108
|
}
|
|
107
109
|
|
|
108
110
|
declare module '@theme/NotFound' {
|
|
109
|
-
|
|
111
|
+
import type {ReactNode} from 'react';
|
|
112
|
+
|
|
113
|
+
export default function NotFound(): ReactNode;
|
|
110
114
|
}
|
|
111
115
|
|
|
112
116
|
declare module '@theme/Root' {
|
|
@@ -115,11 +119,13 @@ declare module '@theme/Root' {
|
|
|
115
119
|
export interface Props {
|
|
116
120
|
readonly children: ReactNode;
|
|
117
121
|
}
|
|
118
|
-
export default function Root({children}: Props):
|
|
122
|
+
export default function Root({children}: Props): ReactNode;
|
|
119
123
|
}
|
|
120
124
|
|
|
121
125
|
declare module '@theme/SiteMetadata' {
|
|
122
|
-
|
|
126
|
+
import type {ReactNode} from 'react';
|
|
127
|
+
|
|
128
|
+
export default function SiteMetadata(): ReactNode;
|
|
123
129
|
}
|
|
124
130
|
|
|
125
131
|
declare module '@docusaurus/constants' {
|
|
@@ -134,13 +140,13 @@ declare module '@docusaurus/ErrorBoundary' {
|
|
|
134
140
|
readonly tryAgain: () => void;
|
|
135
141
|
};
|
|
136
142
|
|
|
137
|
-
export type FallbackFunction = (params: FallbackParams) =>
|
|
143
|
+
export type FallbackFunction = (params: FallbackParams) => ReactNode;
|
|
138
144
|
|
|
139
145
|
export interface Props {
|
|
140
146
|
readonly fallback?: FallbackFunction;
|
|
141
147
|
readonly children: ReactNode;
|
|
142
148
|
}
|
|
143
|
-
export default function ErrorBoundary(props: Props):
|
|
149
|
+
export default function ErrorBoundary(props: Props): ReactNode;
|
|
144
150
|
}
|
|
145
151
|
|
|
146
152
|
declare module '@docusaurus/Head' {
|
|
@@ -149,11 +155,11 @@ declare module '@docusaurus/Head' {
|
|
|
149
155
|
|
|
150
156
|
export type Props = HelmetProps & {children: ReactNode};
|
|
151
157
|
|
|
152
|
-
export default function Head(props: Props):
|
|
158
|
+
export default function Head(props: Props): ReactNode;
|
|
153
159
|
}
|
|
154
160
|
|
|
155
161
|
declare module '@docusaurus/Link' {
|
|
156
|
-
import type {CSSProperties, ComponentProps} from 'react';
|
|
162
|
+
import type {CSSProperties, ComponentProps, ReactNode} from 'react';
|
|
157
163
|
import type {NavLinkProps as RRNavLinkProps} from 'react-router-dom';
|
|
158
164
|
|
|
159
165
|
type NavLinkProps = Partial<RRNavLinkProps>;
|
|
@@ -169,7 +175,7 @@ declare module '@docusaurus/Link' {
|
|
|
169
175
|
/** Escape hatch in case broken links check doesn't make sense. */
|
|
170
176
|
readonly 'data-noBrokenLinkCheck'?: boolean;
|
|
171
177
|
};
|
|
172
|
-
export default function Link(props: Props):
|
|
178
|
+
export default function Link(props: Props): ReactNode;
|
|
173
179
|
}
|
|
174
180
|
|
|
175
181
|
declare module '@docusaurus/Interpolate' {
|
|
@@ -203,7 +209,7 @@ declare module '@docusaurus/Interpolate' {
|
|
|
203
209
|
|
|
204
210
|
export default function Interpolate<Str extends string>(
|
|
205
211
|
props: InterpolateProps<Str>,
|
|
206
|
-
):
|
|
212
|
+
): ReactNode;
|
|
207
213
|
}
|
|
208
214
|
|
|
209
215
|
declare module '@docusaurus/Translate' {
|
|
@@ -241,7 +247,7 @@ declare module '@docusaurus/Translate' {
|
|
|
241
247
|
|
|
242
248
|
export default function Translate<Str extends string>(
|
|
243
249
|
props: TranslateProps<Str>,
|
|
244
|
-
):
|
|
250
|
+
): ReactNode;
|
|
245
251
|
}
|
|
246
252
|
|
|
247
253
|
declare module '@docusaurus/router' {
|
|
@@ -318,11 +324,13 @@ declare module '@docusaurus/ComponentCreator' {
|
|
|
318
324
|
}
|
|
319
325
|
|
|
320
326
|
declare module '@docusaurus/BrowserOnly' {
|
|
327
|
+
import type {ReactNode} from 'react';
|
|
328
|
+
|
|
321
329
|
export interface Props {
|
|
322
|
-
readonly children?: () =>
|
|
323
|
-
readonly fallback?:
|
|
330
|
+
readonly children?: () => ReactNode;
|
|
331
|
+
readonly fallback?: ReactNode;
|
|
324
332
|
}
|
|
325
|
-
export default function BrowserOnly(props: Props):
|
|
333
|
+
export default function BrowserOnly(props: Props): ReactNode | null;
|
|
326
334
|
}
|
|
327
335
|
|
|
328
336
|
declare module '@docusaurus/isInternalUrl' {
|
|
@@ -369,6 +377,9 @@ declare module '@docusaurus/useGlobalData' {
|
|
|
369
377
|
export default function useGlobalData(): GlobalData;
|
|
370
378
|
}
|
|
371
379
|
|
|
380
|
+
// TODO find a way to move this ambient type to the SVGR plugin?
|
|
381
|
+
// unfortunately looks complicated in practice
|
|
382
|
+
// see https://x.com/sebastienlorber/status/1859543512661832053
|
|
372
383
|
declare module '*.svg' {
|
|
373
384
|
import type {ComponentType, SVGProps} from 'react';
|
|
374
385
|
|