fix: fix a few TS errors ()

* 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:
Joshua Chen 2021-08-30 19:06:00 +08:00 committed by GitHub
parent 74f060dde0
commit df3752cc71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 31 additions and 36 deletions
packages/docusaurus-plugin-content-docs/src/client

View file

@ -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,