I’m working on an Obsidian plugin that needs to use commands from other plugins. For example, one of the things I would like it to do is to run “Open today’s daily note” command.
I believe that avoiding compile errors compromises the safety of type definitions. I usually check for the existence of a command before executing it like this, but I would like to know the official way to do it.
Actually, there is a workround to do that. The QuickAdd plugin provides an API called ’ executeChoice’ which can excute a macro-binded choice made by it. Then you can call this api within your scripts. But the limitation of this is you have to create and activate the choice by using QuickAdd. Maybe you can do some investigation on QuickAdd`s source code. Good luck!