mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-03 16:59:06 +02:00
feat: async plugin creator functions (#6166)
This commit is contained in:
parent
f8a670966e
commit
b393700a61
17 changed files with 90 additions and 79 deletions
4
packages/docusaurus-types/src/index.d.ts
vendored
4
packages/docusaurus-types/src/index.d.ts
vendored
|
@ -317,7 +317,9 @@ export type LoadedPlugin<Content = unknown> = InitializedPlugin<Content> & {
|
|||
};
|
||||
|
||||
export type PluginModule = {
|
||||
<T, X>(context: LoadContext, options: T): Plugin<X>;
|
||||
<Options, Content>(context: LoadContext, options: Options):
|
||||
| Plugin<Content>
|
||||
| Promise<Plugin<Content>>;
|
||||
validateOptions?: <T>(data: OptionValidationContext<T>) => T;
|
||||
validateThemeConfig?: <T>(data: ThemeConfigValidationContext<T>) => T;
|
||||
getSwizzleComponentList?: () => string[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue