mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 01:09:20 +02:00
fix(*): make TypeScript realize that each plugin package has a default export (#7294)
This commit is contained in:
parent
b49ae67521
commit
a2c993bf9a
43 changed files with 208 additions and 187 deletions
|
@ -91,10 +91,10 @@ function getInfimaCSSFile(direction: string) {
|
|||
}.css`;
|
||||
}
|
||||
|
||||
export default function docusaurusThemeClassic(
|
||||
export default function themeClassic(
|
||||
context: LoadContext,
|
||||
options: Options,
|
||||
): Plugin<void> {
|
||||
): Plugin<undefined> {
|
||||
const {
|
||||
i18n: {currentLocale, localeConfigs},
|
||||
} = context;
|
||||
|
|
|
@ -21,9 +21,16 @@
|
|||
// in their tsconfig.
|
||||
|
||||
declare module '@docusaurus/theme-classic' {
|
||||
import type {LoadContext, Plugin} from '@docusaurus/types';
|
||||
|
||||
export type Options = {
|
||||
customCss?: string | string[];
|
||||
};
|
||||
|
||||
export default function themeClassic(
|
||||
context: LoadContext,
|
||||
options: Options,
|
||||
): Plugin<undefined>;
|
||||
}
|
||||
|
||||
declare module '@theme/Admonition' {
|
||||
|
@ -47,10 +54,10 @@ declare module '@theme/BackToTopButton' {
|
|||
}
|
||||
|
||||
declare module '@theme/BlogListPaginator' {
|
||||
import type {Metadata} from '@theme/BlogListPage';
|
||||
import type {BlogPaginatedMetadata} from '@docusaurus/plugin-content-blog';
|
||||
|
||||
export interface Props {
|
||||
readonly metadata: Metadata;
|
||||
readonly metadata: BlogPaginatedMetadata;
|
||||
}
|
||||
export default function BlogListPaginator(props: Props): JSX.Element;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue