refactor: make all Props defined as interface + readonly (#5636)

* Initial work

* Fix
This commit is contained in:
Joshua Chen 2021-10-06 01:04:24 +08:00 committed by GitHub
parent 21ef908f00
commit 7f7b858cd4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 169 additions and 141 deletions

View file

@ -12,7 +12,7 @@ declare module '@docusaurus/plugin-content-pages' {
declare module '@theme/MDXPage' {
import type {TOCItem} from '@docusaurus/types';
export type Props = {
export interface Props {
readonly content: {
readonly frontMatter: {
readonly title: string;
@ -28,7 +28,7 @@ declare module '@theme/MDXPage' {
readonly toc: readonly TOCItem[];
(): JSX.Element;
};
};
}
const MDXPage: (props: Props) => JSX.Element;
export default MDXPage;