Error - "Property 'commands' does not exist on type 'App'"

I’m trying to add a command in a plugin I’m making to the ribbon for easy use. I searched this issue already and found this post, which seemed to walk me through how to do it. However, when copying the code over (changing the plugin and command ids to my own), I got the error in the title - “Property ‘commands’ does not exist on type ‘App’”.

I’m very new to programming and don’t know the first thing to do in this situation. My gut feeling is that there’s been a change in the documentation and/or this command since the answer was given, but looking through the current documentation I can’t find anything that does the same thing as this. Any help would really be appreciated!

Moved from Help to “Development & API”.

It’s not in the public API but still exists. You can verify for yourself in the console. You can either add it with a module declaration or ts-ignore it.

Also see this: GitHub - Fevol/obsidian-typings: Typescript typings for undocumented parts of the Obsidian API

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.