obsidianmd / obsidian-api

Type definitions for the latest Obsidian API.
https://docs.obsidian.md
MIT License
1.65k stars 192 forks source link

Bug: `app.setting` is not included in Type Definitions #140

Closed Cutaiar closed 7 months ago

Cutaiar commented 7 months ago

app.setting is not included in the latest Type Definitions available on npm despite widespread use and awareness.

joethei commented 7 months ago

Private APIs are not documented because they are private. There are loads of methods and fields that exists at runtime but aren't in the API because we have not committed to supporting them through the API.

If you decide to use a private API you can do so by adding it in your own local .d.ts file in your plugin repo.

Cutaiar commented 7 months ago

Understood, thanks for the information. Just voicing an opinion here that an eventual public API opening settings would be useful to many plugins 🙂.

For those that land here in the future, consider using / contributing to these unofficial but thorough types.