Commit 84a06d02 authored by nanahira's avatar nanahira

remove bad types

parent 88f96a8e
......@@ -50,32 +50,6 @@ export namespace PluginRegistrar {
export type PluginDefinition<Ctx extends Context, T extends Plugin = any> =
| PluginDefinitionExact<Ctx, T>
| PluginDefinitionName;
export type ClassPluginConfig<
Ctx extends Context,
P extends PluginClass<Ctx>,
> = P extends PluginClass<Ctx, infer C> ? C : never;
export type ExactClassPluginConfig<
Ctx extends Context,
P extends PluginClass<Ctx>,
> = P extends PluginClass<Ctx, any, { config: infer IC }>
? IC
: ClassPluginConfig<Ctx, P>;
export type MapPluginToConfig<
Ctx extends Context,
M extends Dict<PluginClass<Ctx>>,
> = {
[K in keyof M]: ClassPluginConfig<Ctx, M[K]>;
};
export type MapPluginToConfigWithSelection<
Ctx extends Context,
M extends Dict<PluginClass<Ctx>>,
> = {
[K in keyof M]: ClassPluginConfig<Ctx, M[K]> & Selection;
};
}
export function PluginDef(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment