Created
January 10, 2019 10:46
-
-
Save laginha87/65199e5c0e1af72adae3495f91cfede1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function parseExtensionCommands( | |
extensions: Extension<any>[] | |
): CommandOption[] { | |
let options: CommandOption[] = []; | |
extensions.forEach(ext => { | |
let { | |
packageJSON: { contributes: { commands } = { commands: [] } } | |
} = ext; | |
if (commands) { | |
commands.forEach((c: Command) => { | |
options.push(new CommandOption(c)); | |
}); | |
} | |
}); | |
return options; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment