feat(v2): Provide type definitions for MDXPage from page plugin (#3354)

This commit is contained in:
Sam Zhou 2020-08-28 08:58:32 -04:00 committed by GitHub
parent 56c04c7834
commit c8d6e418ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 29 additions and 3 deletions

View 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;
}