mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-03-24 10:45:18 +00:00
29 lines
921 B
TypeScript
29 lines
921 B
TypeScript
import { type Prettify } from "../lib/src/common/types";
|
|
import type { LiveSyncCore } from "../main";
|
|
import type ObsidianLiveSyncPlugin from "../main";
|
|
import { AbstractModule } from "./AbstractModule.ts";
|
|
import type { ChainableExecuteFunction, OverridableFunctionsKeys } from "./ModuleTypes";
|
|
|
|
export type IObsidianModuleBase = OverridableFunctionsKeys<ObsidianLiveSyncPlugin>;
|
|
export type IObsidianModule = Prettify<Partial<IObsidianModuleBase>>;
|
|
export type ModuleKeys = keyof IObsidianModule;
|
|
export type ChainableModuleProps = ChainableExecuteFunction<ObsidianLiveSyncPlugin>;
|
|
|
|
export abstract class AbstractObsidianModule extends AbstractModule {
|
|
get app() {
|
|
return this.plugin.app;
|
|
}
|
|
|
|
constructor(
|
|
public plugin: ObsidianLiveSyncPlugin,
|
|
core: LiveSyncCore
|
|
) {
|
|
super(core);
|
|
}
|
|
|
|
//should be overridden
|
|
isThisModuleEnabled() {
|
|
return true;
|
|
}
|
|
}
|