Bug: `FileSystemAdapter.getFilePath` return type is incorrect
mnaoumov opened this issue · 4 comments
mnaoumov commented
According to the documentation
getFilePath(normalizedPath: string): string;
but if you execute in the console
app.vault.adapter.getFilePath('Note.md') instanceof String
false
app.vault.adapter.getFilePath('Note.md') instanceof app.vault.adapter.url.URL
true
lishid commented
Ah that was a mistake in the implementation. Will be fixed in code in the next release, thanks.
mnaoumov commented
@lishid I would like to bring your attention to the fact that you closed this issue on Dec 23 saying that this is going to be fixed in the next release.
Then on Dec 26 you released Obsidian 1.5.3 which still contains the issue
lishid commented
I can't reproduce. It gives me a string in 1.5.3.
mnaoumov commented
Yes, I was wrong that's because I checked incorrectly
app.vault.adapter.getFilePath('Note.md') instanceof String
false
typeof app.vault.adapter.getFilePath('Note.md') === 'string'
true