mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-13 03:11:46 +00:00
refactor(plugin): new plugin system poc
This commit is contained in:
@ -26,4 +26,9 @@ export interface MenuPlugin<ConfigType extends Config> extends Plugin<ConfigType
|
||||
onEnable: (config: ConfigType) => void;
|
||||
}
|
||||
|
||||
export const defineConfig = <ConfigType extends Config>(config: ConfigType) => config;
|
||||
const defaultPluginConfig: Record<string, unknown> = {};
|
||||
export const definePluginConfig = <T>(id: string, defaultValue: T): T => {
|
||||
defaultPluginConfig[id] = defaultValue;
|
||||
|
||||
return defaultValue;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user