@docusaurus/module-type-aliases 0.0.0-4989 → 0.0.0-4993

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/package.json +3 -3
  2. package/src/index.d.ts +13 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/module-type-aliases",
3
- "version": "0.0.0-4989",
3
+ "version": "0.0.0-4993",
4
4
  "description": "Docusaurus module type aliases.",
5
5
  "types": "./src/index.d.ts",
6
6
  "publishConfig": {
@@ -12,7 +12,7 @@
12
12
  "directory": "packages/docusaurus-module-type-aliases"
13
13
  },
14
14
  "dependencies": {
15
- "@docusaurus/types": "0.0.0-4989",
15
+ "@docusaurus/types": "0.0.0-4993",
16
16
  "@types/react": "*",
17
17
  "@types/react-router-config": "*",
18
18
  "@types/react-router-dom": "*",
@@ -23,5 +23,5 @@
23
23
  "react-dom": "*"
24
24
  },
25
25
  "license": "MIT",
26
- "gitHead": "05d816fdc44392353563df449b05e102c144a2f4"
26
+ "gitHead": "f08d27902e366eda1e1b19b5e405d8811123c4e9"
27
27
  }
package/src/index.d.ts CHANGED
@@ -75,10 +75,14 @@ declare module '@theme-original/*';
75
75
  declare module '@theme-init/*';
76
76
 
77
77
  declare module '@theme/Error' {
78
- export interface Props {
79
- readonly error: Error;
80
- readonly tryAgain: () => void;
81
- }
78
+ import type {ComponentProps} from 'react';
79
+ import type ErrorBoundary from '@docusaurus/ErrorBoundary';
80
+
81
+ type ErrorProps = ComponentProps<
82
+ NonNullable<ComponentProps<typeof ErrorBoundary>['fallback']>
83
+ >;
84
+
85
+ export interface Props extends ErrorProps {}
82
86
  export default function Error(props: Props): JSX.Element;
83
87
  }
84
88
 
@@ -119,11 +123,13 @@ declare module '@docusaurus/constants' {
119
123
  }
120
124
 
121
125
  declare module '@docusaurus/ErrorBoundary' {
122
- import type {ReactNode} from 'react';
123
- import type ErrorComponent from '@theme/Error';
126
+ import type {ReactNode, ComponentType} from 'react';
124
127
 
125
128
  export interface Props {
126
- readonly fallback?: typeof ErrorComponent;
129
+ readonly fallback?: ComponentType<{
130
+ readonly error: Error;
131
+ readonly tryAgain: () => void;
132
+ }>;
127
133
  readonly children: ReactNode;
128
134
  }
129
135
  export default function ErrorBoundary(props: Props): JSX.Element;