-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(plugin-debug): migrate package to TypeScript (#5465)
* Complete migration Signed-off-by: Josh-Cena <[email protected]> * Fix JSON root name Signed-off-by: Josh-Cena <[email protected]>
- Loading branch information
Showing
13 changed files
with
130 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* 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. | ||
*/ | ||
|
||
const path = require('path'); | ||
const fs = require('fs-extra'); | ||
|
||
/** | ||
* Copy all untyped and static assets files to lib. | ||
*/ | ||
const srcDir = path.resolve(__dirname, 'src'); | ||
const libDir = path.resolve(__dirname, 'lib'); | ||
fs.copySync(srcDir, libDir, { | ||
filter(filepath) { | ||
return !/__tests__/.test(filepath) && !/\.tsx?$/.test(filepath); | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 type Props = { | ||
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 type Props = { | ||
src: unknown; | ||
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; | ||
} |