/
githubmirror
/
obsidian-importer
Обзор
Документация
Войти
/
githubmirror
/
obsidian-importer
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/augment.d.ts
46 строк
1 KB
Steph Ango
Remove unnecessary comments
08 авг 2026, 23:29
08 авг 2026, 23:29
5b65ed3
Код
Авторство
О чём код?
import 'obsidian'; declare module 'obsidian' { interface App { metadataTypeManager: { getAssignedWidget: (key: string) => string | null; setType: (key: string, type: string) => void; }; } interface Vault { getConfig: (key: string) => any; /** * Look up a file or folder, ignoring case. * * getAbstractFileByPath is an exact key match on the vault's file map, but * macOS and Windows filesystems are case-insensitive: "Tron.md" and "TRON.md" * are one file on disk while the public lookup reports only the exact * spelling as existing, so a caller relying on it never sees the conflict. * * Only for questions of the form "does this already exist?". To pick a path * to create at, use getUniqueFilePath, which asks the vault for a free one. */ getAbstractFileByPathInsensitive(path: string): TAbstractFile | null; /** * Get a free path to create a file at, appending 1, 2, etc. if needed. * * What Obsidian itself uses when creating a note: it applies the "space + * number" convention and compares case-insensitively, so it will not hand * back a path that collides with an existing file on a case-insensitive * filesystem. */ getAvailablePath(base: string, extension?: string): string; } interface TFolder { getParentPrefix(): string; } interface SecretStorage { // Available at runtime but missing from Obsidian's public types. deleteSecret(id: string): void; } }