Type the name of a method that does not exist. For example: createMe();
Select the newly typed method (just the method name, no this and no parenthesis) and press cmd+shift+p on Mac or ctrl+shift+p on Windows to toggle the commands panel
Type in Implement Method
Pick the first occurence
You will be prompted for a visibility type and a modifier. Here you can pass two parameters comma separated. The first one is the visibility property of the method (public, protected, private). The second one is the modifier (for now the only one supported is static). You can even press Enter without typing anything. A method with private visibility will be created
The newly method will be created with the desired options at the end of the opened file (parent class lookup feature is in progress).
Visual example
public constructor(){
createMe(); // this method will be created below
}
--------------------------------------------------------------
// This is the final result
private createMe() {
// TODO implement me
}
Features
It creates a method with the same name as the selected one at the bottom of the current opened file
It lets you choose the visibility accessor (public, private, protected)
It lets you add a modifier (only static is allowed for now)
Requirements
The file must be a valid .ts file. Any other extension will be refused
Known Issues
For now the extension can create the method only at the end of the currently opened document. A parent class 'lookup' function will be created.