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:
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

View file

@ -166,6 +166,8 @@ declare module '@theme/DocPage' {
}
declare module '@theme/Seo' {
import type {ReactNode} from 'react';
export type Props = {
readonly title?: string;
readonly description?: string;
@ -184,15 +186,16 @@ declare module '@theme/hooks/useDocs' {
type ActivePlugin = import('./client/docsClientUtils').ActivePlugin;
type ActiveDocContext = import('./client/docsClientUtils').ActiveDocContext;
type DocVersionSuggestions = import('./client/docsClientUtils').DocVersionSuggestions;
type GetActivePluginOptions = import('./client/docsClientUtils').GetActivePluginOptions;
export type {GlobalPluginData, GlobalVersion};
export const useAllDocsData: () => Record<string, GlobalPluginData>;
export const useDocsData: (pluginId?: string) => GlobalPluginData;
export const useActivePlugin: (
options: GetActivePluginOptions = {},
options?: GetActivePluginOptions,
) => ActivePlugin | undefined;
export const useActivePluginAndVersion: (
options: GetActivePluginOptions = {},
options?: GetActivePluginOptions,
) =>
| {activePlugin: ActivePlugin; activeVersion: GlobalVersion | undefined}
| undefined;