mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-28 08:27:03 +02:00
refactor: make all Props defined as interface + readonly (#5636)
* Initial work * Fix
This commit is contained in:
parent
21ef908f00
commit
7f7b858cd4
11 changed files with 169 additions and 141 deletions
14
packages/docusaurus-plugin-debug/src/types.d.ts
vendored
14
packages/docusaurus-plugin-debug/src/types.d.ts
vendored
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue