mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-09-26 12:37:07 +00:00
WIP: Add test
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/* eslint-disable no-restricted-globals */
|
||||
import type { App } from "obsidian";
|
||||
|
||||
declare global {
|
||||
var app: App & {
|
||||
plugins: {
|
||||
enabledPlugins: Set<string>;
|
||||
enablePlugin: (name: string) => Promise<void>;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export const enablePlugin = async (pluginName: string) => {
|
||||
return await window.app.plugins.enablePlugin(pluginName);
|
||||
};
|
||||
|
||||
export const isPluginEnabled = (pluginName: string) => {
|
||||
return window.app.plugins.enabledPlugins.has(pluginName);
|
||||
};
|
||||
Reference in New Issue
Block a user