fix(types): fix type of PluginModule (#10420)

This commit is contained in:
Sébastien Lorber 2024-08-19 18:30:52 +02:00 committed by GitHub
parent 0b640ca3e2
commit 2d55ca474e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 445 additions and 366 deletions

View file

@ -191,9 +191,8 @@ export type LoadedPlugin = InitializedPlugin & {
export type PluginModule<Content = unknown> = {
(context: LoadContext, options: unknown):
| Plugin<Content>
| Promise<Plugin<Content>>
| null
| Promise<null>;
| Promise<Plugin<Content> | null>;
validateOptions?: <T, U>(data: OptionValidationContext<T, U>) => U;
validateThemeConfig?: <T>(data: ThemeConfigValidationContext<T>) => T;