mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-04 01:09:20 +02:00
refactor: improve internal typing (#6507)
* refactor: improve internal typing * fix * fix test
This commit is contained in:
parent
58e07a6796
commit
2553f1fb5a
14 changed files with 165 additions and 132 deletions
5
packages/docusaurus-types/src/index.d.ts
vendored
5
packages/docusaurus-types/src/index.d.ts
vendored
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
|
||||
import type {RuleSetRule, Configuration} from 'webpack';
|
||||
import type {Command} from 'commander';
|
||||
import type {CommanderStatic} from 'commander';
|
||||
import type {ParsedUrlQueryInput} from 'querystring';
|
||||
import type Joi from 'joi';
|
||||
import type {Overwrite, DeepPartial} from 'utility-types';
|
||||
|
@ -259,7 +259,6 @@ export interface Plugin<Content = unknown> {
|
|||
}) => Promise<void>;
|
||||
routesLoaded?: (routes: RouteConfig[]) => void; // TODO remove soon, deprecated (alpha-60)
|
||||
postBuild?: (props: Props & {content: Content}) => Promise<void>;
|
||||
postStart?: (props: Props) => void;
|
||||
// TODO refactor the configureWebpack API surface: use an object instead of multiple params (requires breaking change)
|
||||
configureWebpack?: (
|
||||
config: Configuration,
|
||||
|
@ -272,7 +271,7 @@ export interface Plugin<Content = unknown> {
|
|||
getTypeScriptThemePath?: () => string;
|
||||
getPathsToWatch?: () => string[];
|
||||
getClientModules?: () => string[];
|
||||
extendCli?: (cli: Command) => void;
|
||||
extendCli?: (cli: CommanderStatic) => void;
|
||||
injectHtmlTags?: ({content}: {content: Content}) => {
|
||||
headTags?: HtmlTags;
|
||||
preBodyTags?: HtmlTags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue