mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-18 11:36:53 +02:00
fix: fix a few TS errors (#5437)
* fix errors Signed-off-by: Josh-Cena <sidachen2003@gmail.com> * Fix website Signed-off-by: Josh-Cena <sidachen2003@gmail.com> * Revert adding lib Signed-off-by: Josh-Cena <sidachen2003@gmail.com> * Fix tsconfig Signed-off-by: Josh-Cena <sidachen2003@gmail.com> * Restore previous ordering Signed-off-by: Josh-Cena <sidachen2003@gmail.com> * exclude sw.js from typechecking * Tests: include typechecking of website * cleanup @site/ alias in TS config Co-authored-by: slorber <lorber.sebastien@gmail.com>
This commit is contained in:
parent
74f060dde0
commit
df3752cc71
12 changed files with 31 additions and 36 deletions
packages/docusaurus-plugin-content-docs/src/client
|
@ -20,22 +20,11 @@ export type ActivePlugin = {
|
|||
pluginData: GlobalPluginData;
|
||||
};
|
||||
|
||||
export type GetActivePluginOptions = {failfast?: boolean};
|
||||
export type GetActivePluginOptions = {failfast?: boolean}; // use fail-fast option if you know for sure one plugin instance is active
|
||||
|
||||
// get the data of the plugin that is currently "active"
|
||||
// ie the docs of that plugin are currently browsed
|
||||
// it is useful to support multiple docs plugin instances
|
||||
export function getActivePlugin(
|
||||
allPluginDatas: Record<string, GlobalPluginData>,
|
||||
pathname: string,
|
||||
options: {failfast: true}, // use fail-fast option if you know for sure one plugin instance is active
|
||||
): ActivePlugin;
|
||||
export function getActivePlugin(
|
||||
allPluginDatas: Record<string, GlobalPluginData>,
|
||||
pathname: string,
|
||||
options?: GetActivePluginOptions,
|
||||
): ActivePlugin | undefined;
|
||||
|
||||
export function getActivePlugin(
|
||||
allPluginDatas: Record<string, GlobalPluginData>,
|
||||
pathname: string,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue