mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-28 08:27:03 +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
12
packages/docusaurus-mdx-loader/src/types.d.ts
vendored
12
packages/docusaurus-mdx-loader/src/types.d.ts
vendored
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue