vscode-invert-if
v1.0.2
Published
Invert if blocks & conditions and create guard clauses on the fly
Downloads
3
Maintainers
Readme
Visual Studio Code Invert If
API
This package includes the API for extensions interacting with the extension (Invert If)[https://marketplace.visualstudio.com/items?itemName=1nVitr0.invert-if] for Visual Studio Code.
For the full documentation refer to the Type Definitions or to the Contributing Guidelines.
Basic usage
import { extensions } from "vscode";
import { InvertIfBaseProvider } from "vscode-invert-if";
const invertIfExtension = extensions.getExtension<InvertIfBaseProvider>("1nVitr0.invert-if");
const provider = new YourLanguageSupportProvider();
if (invertIfExtension) {
const invertIf = invertIfExtension.exports;
invertIf.registerConditionProvider(provider, documentFilter);
invertIf.registerIfElseProvider(provider, documentFilter);
invertIf.registerGuardClauseProvider(provider, documentFilter);
}