mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 16:59:06 +02:00
refactor(v2): add typing for docs plugin (#1811)
* refactor(v2): add typing for docs plugin * nits
This commit is contained in:
parent
f671e6b437
commit
1591128cdd
25 changed files with 304 additions and 131 deletions
8
packages/docusaurus-types/src/index.d.ts
vendored
8
packages/docusaurus-types/src/index.d.ts
vendored
|
@ -57,7 +57,7 @@ export interface PluginContentLoadedActions {
|
|||
|
||||
export interface Plugin<T> {
|
||||
name: string;
|
||||
loadContent?(): T;
|
||||
loadContent?(): Promise<T>;
|
||||
contentLoaded?({
|
||||
content,
|
||||
actions,
|
||||
|
@ -67,7 +67,11 @@ export interface Plugin<T> {
|
|||
}): void;
|
||||
postBuild?(props: Props): void;
|
||||
postStart?(props: Props): void;
|
||||
configureWebpack?(config: Configuration, isServer: boolean): Configuration;
|
||||
configureWebpack?(
|
||||
config: Configuration,
|
||||
isServer: boolean,
|
||||
utils: ConfigureWebpackUtils,
|
||||
): Configuration;
|
||||
getThemePath?(): string;
|
||||
getPathsToWatch?(): string[];
|
||||
getClientModules?(): string[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue