generated from obsidianmd/obsidian-sample-plugin
-
Notifications
You must be signed in to change notification settings - Fork 9
/
types.d.ts
31 lines (30 loc) · 1014 Bytes
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import "obsidian";
import { DataviewApi } from "obsidian-dataview";
declare module "obsidian" {
interface App {
plugins: {
enabledPlugins: Set<string>;
plugins: {
[id: string]: any;
dataview?: {
api?: DataviewApi;
};
};
};
}
interface MetadataCache {
on(name: "typing:schema-change", callback: () => any, ctx?: any): EventRef;
on(name: "typing:schema-ready", callback: () => any, ctx?: any): EventRef;
on(name: "dataview:api-ready", callback: (api: DataviewPlugin["api"]) => any, ctx?: any): EventRef;
on(
name: "dataview:metadata-change",
callback: (
...args:
| [op: "rename", file: TAbstractFile, oldPath: string]
| [op: "delete", file: TFile]
| [op: "update", file: TFile]
) => any,
ctx?: any
): EventRef;
}
}