import { commands } from "vscode" ; import { Context } from "../Context" ; export class Command { private static commandPrefix = "lana." ; name : string ; run : ( ... args : any [ ] ) => any ; constructor ( name , run ) { this . name = name ; this . run = run ; } register ( c ) { const fullName = Command . commandPrefix + this . name ; const command = commands . registerCommand ( fullName , this . run ) ; c . context . subscriptions . push ( command ) ; return this ; } }