use {*} instead of in jsdocs

This commit is contained in:
Matt Bierner
2017-02-23 14:17:49 -08:00
parent b5687d4b8f
commit 8ced802f0a

View File

@@ -135,8 +135,8 @@ export default class JsDocCompletionHelper implements CompletionItemProvider {
template = template.replace(/^(\/\*\*\s*\*[ ]*)$/m, (x) => x + `\$0`);
template = template.replace(/\* @param([ ]\{\S+\})?\s+(\S+)\s*$/gm, (_param, type, post) => {
let out = '* @param ';
if (type === ' {any}') {
out += `{\$\{${snippetIndex++}:any\}} `;
if (type === ' {any}' || type === ' {*}') {
out += `{\$\{${snippetIndex++}:*\}} `;
} else if (type) {
out += type + ' ';
}