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

@ -6,6 +6,9 @@
*/
declare module '@docusaurus/mdx-loader' {
type RemarkOrRehypePlugin =
// eslint-disable-next-line @typescript-eslint/ban-types
[Function, Record<string, unknown>] | Function;
export interface RemarkAndRehypePluginOptions {
remarkPlugins: RemarkOrRehypePlugin[];
rehypePlugins: string[];
@ -18,7 +21,7 @@ declare module '@docusaurus/mdx-loader' {
declare module '@mdx-js/mdx' {
import type {Plugin, Processor} from 'unified';
export namespace mdx {
namespace mdx {
interface Options {
filepath?: string;
skipExport?: boolean;
@ -31,8 +34,7 @@ declare module '@mdx-js/mdx' {
function createMdxAstCompiler(options?: Options): Processor;
function createCompiler(options?: Options): Processor;
}
export default function mdx(
content: string,
options?: mdx.Options,
): Promise<string>;
function mdx(content: string, options?: mdx.Options): Promise<string>;
export default mdx;
}