Internal typings package

This commit is contained in:
Lost Paul 2024-08-20 12:56:26 +02:00
parent 5e903abab5
commit bd78c12329
2 changed files with 13 additions and 7 deletions

13
src/globals.d.ts vendored
View file

@ -12,9 +12,6 @@ declare module 'obsidian' {
disablePlugin: (id: string) => Promise<void>;
};
}
interface Vault {
getConfig: (config: string) => unknown;
}
interface Setting {
createList: (list: ListComponent | ((list: ListComponent) => void)) => ListComponent;
}
@ -26,8 +23,6 @@ declare module 'obsidian' {
dom: HTMLElement;
}
interface FileManager {
promptForFileRename: (file: TAbstractFile) => void;
promptForDeletion: (file: TAbstractFile) => void;
promptForFolderDeletion: (folder: TFolder) => void;
}
@ -53,3 +48,11 @@ interface FileExplorerViewFileItem extends TAbstractFile {
interface FileExplorerView extends View {
fileItems: { [path: string]: FileExplorerViewFileItem };
}
declare global {
interface Window {
i18next: {
t: (key: string, options?: { [key: string]: string }) => string;
};
}
}

View file

@ -10,7 +10,7 @@
"moduleResolution": "node",
"importHelpers": true,
"isolatedModules": true,
"strictNullChecks": true,
"strictNullChecks": true,
"lib": [
"DOM",
"ES5",
@ -21,5 +21,8 @@
},
"include": [
"**/*.ts"
],
"types": [
"obsidian-typings"
]
}
}