mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-11 15:22:29 +02:00
feat(v2): Provide type definitions for MDXPage from page plugin (#3354)
This commit is contained in:
parent
56c04c7834
commit
c8d6e418ff
4 changed files with 29 additions and 3 deletions
25
packages/docusaurus-plugin-content-pages/src/plugin-content-pages.d.ts
vendored
Normal file
25
packages/docusaurus-plugin-content-pages/src/plugin-content-pages.d.ts
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
declare module '@theme/MDXPage' {
|
||||
import type {MarkdownRightTableOfContents} from '@docusaurus/types';
|
||||
|
||||
export type Props = {
|
||||
readonly content: {
|
||||
readonly frontMatter: {
|
||||
readonly title: string;
|
||||
readonly description: string;
|
||||
};
|
||||
readonly metadata: {readonly permalink: string};
|
||||
readonly rightToc: readonly MarkdownRightTableOfContents[];
|
||||
(): JSX.Element;
|
||||
};
|
||||
};
|
||||
|
||||
const MDXPage: (props: Props) => JSX.Element;
|
||||
export default MDXPage;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue