mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-10 15:47:23 +02:00
refactor: make entire project typecheck with root tsconfig (#7466)
This commit is contained in:
parent
89b0fff128
commit
2d94d575a1
17 changed files with 74 additions and 36 deletions
|
@ -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, {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue