refactor: make entire project typecheck with root tsconfig (#7466)

This commit is contained in:
Joshua Chen 2022-05-23 12:54:25 +08:00 committed by GitHub
parent 89b0fff128
commit 2d94d575a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 74 additions and 36 deletions

View file

@ -34,8 +34,9 @@ const StableEmptyObject = {};
// In blog-only mode, docs hooks are still used by the theme. We need a fail-
// safe fallback when the docs plugin is not in use
export const useAllDocsData = (): {[pluginId: string]: GlobalPluginData} =>
useAllPluginInstancesData('docusaurus-plugin-content-docs') ??
StableEmptyObject;
(useAllPluginInstancesData('docusaurus-plugin-content-docs') as {
[pluginId: string]: GlobalPluginData;
}) ?? StableEmptyObject;
export const useDocsData = (pluginId: string | undefined): GlobalPluginData =>
usePluginData('docusaurus-plugin-content-docs', pluginId, {