@docusaurus/module-type-aliases 0.0.0-5059 → 0.0.0-5064

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 +11 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/module-type-aliases",
3
- "version": "0.0.0-5059",
3
+ "version": "0.0.0-5064",
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-5059",
15
+ "@docusaurus/types": "0.0.0-5064",
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": "c24f5c455a125fd0da360e7946641f0566a718b7"
26
+ "gitHead": "a6a4899de8a593bbce5a935e9ad677fa0dd6df7f"
27
27
  }
package/src/index.d.ts CHANGED
@@ -77,14 +77,9 @@ declare module '@theme-original/*';
77
77
  declare module '@theme-init/*';
78
78
 
79
79
  declare module '@theme/Error' {
80
- import type {ComponentProps} from 'react';
81
- import type ErrorBoundary from '@docusaurus/ErrorBoundary';
80
+ import type {FallbackParams} from '@docusaurus/ErrorBoundary';
82
81
 
83
- type ErrorProps = ComponentProps<
84
- NonNullable<ComponentProps<typeof ErrorBoundary>['fallback']>
85
- >;
86
-
87
- export interface Props extends ErrorProps {}
82
+ export interface Props extends FallbackParams {}
88
83
  export default function Error(props: Props): JSX.Element;
89
84
  }
90
85
 
@@ -125,13 +120,17 @@ declare module '@docusaurus/constants' {
125
120
  }
126
121
 
127
122
  declare module '@docusaurus/ErrorBoundary' {
128
- import type {ReactNode, ComponentType} from 'react';
123
+ import type {ReactNode} from 'react';
124
+
125
+ export type FallbackParams = {
126
+ readonly error: Error;
127
+ readonly tryAgain: () => void;
128
+ };
129
+
130
+ export type FallbackFunction = (params: FallbackParams) => JSX.Element;
129
131
 
130
132
  export interface Props {
131
- readonly fallback?: ComponentType<{
132
- readonly error: Error;
133
- readonly tryAgain: () => void;
134
- }>;
133
+ readonly fallback?: FallbackFunction;
135
134
  readonly children: ReactNode;
136
135
  }
137
136
  export default function ErrorBoundary(props: Props): JSX.Element;