From bd78c123293f685564f30ee2e061c59ea16cbfbd Mon Sep 17 00:00:00 2001 From: Lost Paul <70213368+LostPaul@users.noreply.github.com> Date: Tue, 20 Aug 2024 12:56:26 +0200 Subject: [PATCH] Internal typings package --- src/globals.d.ts | 13 ++++++++----- tsconfig.json | 7 +++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/globals.d.ts b/src/globals.d.ts index 4f5d328..09d9599 100644 --- a/src/globals.d.ts +++ b/src/globals.d.ts @@ -12,9 +12,6 @@ declare module 'obsidian' { disablePlugin: (id: string) => Promise; }; } - 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; + }; + } +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index bffe2fa..601fb4d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -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" ] -} +} \ No newline at end of file