@docusaurus/module-type-aliases 2.0.0-beta.15 → 2.0.0-beta.16
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 +9 -5
- package/src/index.d.ts +16 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docusaurus/module-type-aliases",
|
|
3
|
-
"version": "2.0.0-beta.
|
|
3
|
+
"version": "2.0.0-beta.16",
|
|
4
4
|
"description": "Docusaurus module type aliases.",
|
|
5
5
|
"types": "./src/index.d.ts",
|
|
6
6
|
"publishConfig": {
|
|
@@ -12,12 +12,16 @@
|
|
|
12
12
|
"directory": "packages/docusaurus-module-type-aliases"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@docusaurus/types": "2.0.0-beta.
|
|
15
|
+
"@docusaurus/types": "2.0.0-beta.16",
|
|
16
16
|
"@types/react": "*",
|
|
17
|
-
"@types/react-helmet": "*",
|
|
18
17
|
"@types/react-router-config": "*",
|
|
19
|
-
"@types/react-router-dom": "*"
|
|
18
|
+
"@types/react-router-dom": "*",
|
|
19
|
+
"react-helmet-async": "*"
|
|
20
|
+
},
|
|
21
|
+
"peerDependencies": {
|
|
22
|
+
"react": "*",
|
|
23
|
+
"react-dom": "*"
|
|
20
24
|
},
|
|
21
25
|
"license": "MIT",
|
|
22
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "eb43c4d4f95a4fb97dc9bb9dc615413e0dc2e1e7"
|
|
23
27
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
declare module '@generated/client-modules' {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
import type {ClientModule} from '@docusaurus/types';
|
|
10
|
+
|
|
11
|
+
const clientModules: readonly (ClientModule & {default: ClientModule})[];
|
|
11
12
|
export default clientModules;
|
|
12
13
|
}
|
|
13
14
|
|
|
@@ -36,7 +37,7 @@ declare module '@generated/registry' {
|
|
|
36
37
|
declare module '@generated/routes' {
|
|
37
38
|
import type {RouteConfig} from 'react-router-config';
|
|
38
39
|
|
|
39
|
-
type Route = {
|
|
40
|
+
export type Route = {
|
|
40
41
|
readonly path: string;
|
|
41
42
|
readonly component: RouteConfig['component'];
|
|
42
43
|
readonly exact?: boolean;
|
|
@@ -82,6 +83,7 @@ declare module '@generated/codeTranslations' {
|
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
declare module '@theme-original/*';
|
|
86
|
+
declare module '@theme-init/*';
|
|
85
87
|
|
|
86
88
|
declare module '@theme/Error' {
|
|
87
89
|
export interface Props {
|
|
@@ -137,20 +139,19 @@ declare module '@docusaurus/ErrorBoundary' {
|
|
|
137
139
|
}
|
|
138
140
|
|
|
139
141
|
declare module '@docusaurus/Head' {
|
|
140
|
-
import type {HelmetProps} from 'react-helmet';
|
|
142
|
+
import type {HelmetProps} from 'react-helmet-async';
|
|
141
143
|
import type {ReactNode} from 'react';
|
|
142
144
|
|
|
143
|
-
export type
|
|
145
|
+
export type Props = HelmetProps & {children: ReactNode};
|
|
144
146
|
|
|
145
|
-
|
|
146
|
-
export default Head;
|
|
147
|
+
export default function Head(props: Props): JSX.Element;
|
|
147
148
|
}
|
|
148
149
|
|
|
149
150
|
declare module '@docusaurus/Link' {
|
|
150
151
|
import type {CSSProperties, ComponentProps} from 'react';
|
|
151
152
|
|
|
152
153
|
type NavLinkProps = Partial<import('react-router-dom').NavLinkProps>;
|
|
153
|
-
export type
|
|
154
|
+
export type Props = NavLinkProps &
|
|
154
155
|
ComponentProps<'a'> & {
|
|
155
156
|
readonly className?: string;
|
|
156
157
|
readonly style?: CSSProperties;
|
|
@@ -162,8 +163,7 @@ declare module '@docusaurus/Link' {
|
|
|
162
163
|
// escape hatch in case broken links check is annoying for a specific link
|
|
163
164
|
readonly 'data-noBrokenLinkCheck'?: boolean;
|
|
164
165
|
};
|
|
165
|
-
|
|
166
|
-
export default Link;
|
|
166
|
+
export default function Link(props: Props): JSX.Element;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
declare module '@docusaurus/Interpolate' {
|
|
@@ -179,13 +179,13 @@ declare module '@docusaurus/Interpolate' {
|
|
|
179
179
|
Value extends ReactNode,
|
|
180
180
|
> = Record<ExtractInterpolatePlaceholders<Str>, Value>;
|
|
181
181
|
|
|
182
|
-
//
|
|
182
|
+
// If all the values are plain strings, interpolate returns a simple string
|
|
183
183
|
export function interpolate<Str extends string>(
|
|
184
184
|
text: Str,
|
|
185
185
|
values?: InterpolateValues<Str, string | number>,
|
|
186
186
|
): string;
|
|
187
187
|
|
|
188
|
-
// If values contain any ReactNode,
|
|
188
|
+
// If values contain any ReactNode, the return is a ReactNode
|
|
189
189
|
export function interpolate<Str extends string, Value extends ReactNode>(
|
|
190
190
|
text: Str,
|
|
191
191
|
values?: InterpolateValues<Str, Value>,
|
|
@@ -241,11 +241,7 @@ declare module '@docusaurus/Translate' {
|
|
|
241
241
|
|
|
242
242
|
declare module '@docusaurus/router' {
|
|
243
243
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
244
|
-
export
|
|
245
|
-
}
|
|
246
|
-
declare module '@docusaurus/history' {
|
|
247
|
-
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
248
|
-
export * from 'history';
|
|
244
|
+
export {useHistory, useLocation, Redirect, matchPath} from 'react-router-dom';
|
|
249
245
|
}
|
|
250
246
|
|
|
251
247
|
declare module '@docusaurus/useDocusaurusContext' {
|
|
@@ -289,11 +285,10 @@ declare module '@docusaurus/ExecutionEnvironment' {
|
|
|
289
285
|
declare module '@docusaurus/ComponentCreator' {
|
|
290
286
|
import type Loadable from 'react-loadable';
|
|
291
287
|
|
|
292
|
-
function ComponentCreator(
|
|
288
|
+
export default function ComponentCreator(
|
|
293
289
|
path: string,
|
|
294
290
|
hash: string,
|
|
295
291
|
): ReturnType<typeof Loadable>;
|
|
296
|
-
export default ComponentCreator;
|
|
297
292
|
}
|
|
298
293
|
|
|
299
294
|
declare module '@docusaurus/BrowserOnly' {
|
|
@@ -301,8 +296,7 @@ declare module '@docusaurus/BrowserOnly' {
|
|
|
301
296
|
readonly children?: () => JSX.Element;
|
|
302
297
|
readonly fallback?: JSX.Element;
|
|
303
298
|
}
|
|
304
|
-
|
|
305
|
-
export default BrowserOnly;
|
|
299
|
+
export default function BrowserOnly(props: Props): JSX.Element | null;
|
|
306
300
|
}
|
|
307
301
|
|
|
308
302
|
declare module '@docusaurus/isInternalUrl' {
|
|
@@ -332,8 +326,7 @@ declare module '@docusaurus/useGlobalData' {
|
|
|
332
326
|
): T;
|
|
333
327
|
|
|
334
328
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
335
|
-
function useGlobalData(): Record<string, any>;
|
|
336
|
-
export default useGlobalData;
|
|
329
|
+
export default function useGlobalData(): Record<string, any>;
|
|
337
330
|
}
|
|
338
331
|
|
|
339
332
|
declare module '*.svg' {
|