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

@ -14,9 +14,9 @@ declare module '@theme/DebugConfig' {
declare module '@theme/DebugContent' {
import type {AllContent} from '@docusaurus/types';
export type Props = {
allContent: AllContent;
};
export interface Props {
readonly allContent: AllContent;
}
export default function DebugContent(props: Props): JSX.Element;
}
@ -25,10 +25,10 @@ declare module '@theme/DebugGlobalData' {
}
declare module '@theme/DebugJsonView' {
export type Props = {
src: unknown;
collapseDepth?: number;
};
export interface Props {
readonly src: unknown;
readonly collapseDepth?: number;
}
export default function DebugJsonView(props: Props): JSX.Element;
}