refactor(v2): add typing for docs plugin (#1811)

* refactor(v2): add typing for docs plugin

* nits
This commit is contained in:
Endi 2019-10-07 18:28:33 +07:00 committed by GitHub
parent f671e6b437
commit 1591128cdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
25 changed files with 304 additions and 131 deletions

View file

@ -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[];