refactor: improve setup of type declaration files (#5914)

This commit is contained in:
Joshua Chen 2021-11-13 00:47:27 +08:00 committed by GitHub
parent 334470b5d4
commit d1308a8736
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 872 additions and 868 deletions

View file

@ -0,0 +1,51 @@
/**
* 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.
*/
/// <reference types="@docusaurus/module-type-aliases" />
declare module '@theme/DebugConfig' {
export default function DebugMetadata(): JSX.Element;
}
declare module '@theme/DebugContent' {
import type {AllContent} from '@docusaurus/types';
export interface Props {
readonly allContent: AllContent;
}
export default function DebugContent(props: Props): JSX.Element;
}
declare module '@theme/DebugGlobalData' {
export default function DebugGlobalData(): JSX.Element;
}
declare module '@theme/DebugJsonView' {
export interface Props {
readonly src: unknown;
readonly collapseDepth?: number;
}
export default function DebugJsonView(props: Props): JSX.Element;
}
declare module '@theme/DebugLayout' {
export default function DebugLayout(props: {
children: ReactNode;
}): JSX.Element;
}
declare module '@theme/DebugRegistry' {
export default function DebugRegistry(): JSX.Element;
}
declare module '@theme/DebugRoutes' {
export default function DebugRoutes(): JSX.Element;
}
declare module '@theme/DebugSiteMetadata' {
export default function DebugSiteMetadata(): JSX.Element;
}