Skip to content

Commit dd6e3ef

Browse files
committedDec 22, 2021
fix(types): support plain string usage for known third-party plugins
1 parent eab6741 commit dd6e3ef

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
 

‎packages/vuepress/types/plugin.ts

+7
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,20 @@ export type KnownThirdPartyPluginTuple = {
4242
[K in KnownThirdPartyPlugins]?: [K | ShortcutName4ThirdPartyPluginName<K>, AllowBoolean<Record<string, any>>?]
4343
}[KnownThirdPartyPlugins];
4444

45+
/**
46+
* Final plugin tuple
47+
*/
4548
export type PluginTuple =
4649
| OfficialPluginName
4750
| KnownThirdPartyPlugins
51+
| ShortcutName4ThirdPartyPluginName<KnownThirdPartyPlugins>
4852
| OfficialPluginTuple
4953
| ThirdPartyPluginTuple
5054
| KnownThirdPartyPluginTuple;
5155

56+
/**
57+
* Object config
58+
*/
5259
export type PluginObject = Partial<PluginConfigMap>
5360
& {
5461
[T in OfficialPluginName as ShortcutName4OfficialPluginName<T>]?: PluginConfigMap[T]

0 commit comments

Comments
 (0)
Please sign in to comment.