mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-30 17:37:09 +02:00
fix: fix various TS errors (#5261)
* Fix import errors Signed-off-by: Josh-Cena <sidachen2003@gmail.com> * Oops Signed-off-by: Josh-Cena <sidachen2003@gmail.com> * Mark contentLoaded async Signed-off-by: Josh-Cena <sidachen2003@gmail.com>
This commit is contained in:
parent
778def2d8c
commit
650f989dbb
3 changed files with 10 additions and 9 deletions
|
@ -9,6 +9,8 @@
|
|||
|
||||
declare module '@docusaurus/plugin-content-docs-types' {
|
||||
type VersionBanner = import('./types').VersionBanner;
|
||||
type GlobalDataVersion = import('./types').GlobalVersion;
|
||||
type GlobalDataDoc = import('./types').GlobalDoc;
|
||||
|
||||
export type PropVersionMetadata = {
|
||||
pluginId: string;
|
||||
|
@ -43,14 +45,12 @@ declare module '@docusaurus/plugin-content-docs-types' {
|
|||
[sidebarId: string]: PropSidebarItem[];
|
||||
};
|
||||
|
||||
export type {
|
||||
GlobalVersion as GlobalDataVersion,
|
||||
GlobalDoc as GlobalDataDoc,
|
||||
} from './types';
|
||||
export type {GlobalDataVersion, GlobalDataDoc};
|
||||
}
|
||||
|
||||
declare module '@theme/DocItem' {
|
||||
import type {TOCItem} from '@docusaurus/types';
|
||||
import type {PropVersionMetadata} from '@docusaurus/plugin-content-docs-types';
|
||||
|
||||
export type DocumentRoute = {
|
||||
readonly component: () => JSX.Element;
|
||||
|
|
|
@ -536,9 +536,10 @@ declare module '@theme/ThemedImage' {
|
|||
}
|
||||
|
||||
declare module '@theme/Details' {
|
||||
export type Props = import('@docusaurus/theme-common').Details;
|
||||
const Props: (props: Props) => JSX.Element;
|
||||
export default Props;
|
||||
import {Details, DetailsProps} from '@docusaurus/theme-common';
|
||||
|
||||
export type Props = DetailsProps;
|
||||
export default Details;
|
||||
}
|
||||
|
||||
declare module '@theme/ThemeProvider' {
|
||||
|
@ -562,7 +563,7 @@ declare module '@theme/TOC' {
|
|||
readonly isChild?: boolean;
|
||||
};
|
||||
|
||||
export const TOCHeadings: (props: HeadingsProps) => JSX.Element;
|
||||
export const TOCHeadings: (props: TOCHeadingsProps) => JSX.Element;
|
||||
|
||||
const TOC: (props: TOCProps) => JSX.Element;
|
||||
export default TOC;
|
||||
|
|
2
packages/docusaurus-types/src/index.d.ts
vendored
2
packages/docusaurus-types/src/index.d.ts
vendored
|
@ -229,7 +229,7 @@ export interface Plugin<Content = unknown> {
|
|||
content: Content; // the content loaded by this plugin instance
|
||||
allContent: AllContent; // content loaded by ALL the plugins
|
||||
actions: PluginContentLoadedActions;
|
||||
}): void;
|
||||
}): Promise<void>;
|
||||
routesLoaded?(routes: RouteConfig[]): void; // TODO remove soon, deprecated (alpha-60)
|
||||
postBuild?(props: Props): void;
|
||||
postStart?(props: Props): void;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue