Skip to content

Disclaimer

This project is not officially affiliated to, or endorsed by, the Obsidian team. If you are developing your first plugin, or you are new to programming in general, please refer to the official API documentation first, this project is intended for advanced plugin use-cases that are not covered by the official API.


Please be aware that there is a good reason why (some of) the functions and types defined here are not included with the official API definitions:

  • The methods are not fully defined, and will be changed or removed in the near-future
  • There is a high risk of the code behaving unexpectedly if used improperly
  • The function was never meant to be used

Please use the functions and variables provided with caution. Be prepared to update your code if the API changes, and only use the functions if you are confident that you understand what they will do.

Reference the official API first to see if your problem may be solved with a documented function, or search in the #plugin-dev channel of the Obsidian Discord server. Some functions will also contain @remark TSDoc tags that provide alternatives or better solutions.

Methods marked @internal are especially risky to use: these are either not fully typed yet, or are solely intended to be used internally by the Obsidian app.

Furthermore, there is a very high chance that there are mistakes in the typings, despite best efforts. All types had to be deduced from either context, manually running the function, or from the minified app code. You should verify that the code behaves as expected, both with regard to the expected (input/output)types, as well as what the function description promises.

With these scary disclaimers out of the way, hopefully these typings will help you in removing 90% of the @ts-ignores you have in your codebase, or discover solutions that didn’t seem possible before.