<!-- Do not edit this file. It is automatically generated by API Documenter. --> [`Command`](Command) › [`checkCallback`](Command/checkCallback) ## Command.checkCallback property Complex callback, overrides the simple callback. Used to "check" whether your command can be performed in the current circumstances. For example, if your command requires the active focused pane to be a MarkdownView, then you should only return true if the condition is satisfied. Returning false or undefined causes the command to be hidden from the command palette. **Signature:** ```typescript checkCallback?: (checking: boolean) => boolean | void; ``` ## Example ```ts this.addCommand({ id: 'example-command', name: 'Example command', checkCallback: (checking: boolean) => { const value = getRequiredValue(); if (value) { if (!checking) { doCommand(value); } return true; } return false; } }); ```