vscode-javascript icon indicating copy to clipboard operation
vscode-javascript copied to clipboard

Added snippet for async named function.

Open pramodkandel opened this issue 4 years ago • 3 comments

Added snippet for async function because I need it a lot for what I'm doing (I have more async functions than sync). For shortcut, I have it as "asnfn", which is consistent with other functions where "fn" keyword is a suffix. If I could have, I'd have changed all function-based snippets to have "fn" as prefix instead of suffix, but can't change that now. Or can we? ;)

pramodkandel avatar Mar 22 '21 10:03 pramodkandel

This is going to really help with puppeteer syntax in nodejs.

Till this gets merged you can use user snippet in your codium

"async const function": { "prefix": "asnfn", "body": [ "const ${1:name} = async (${2:params}) =>{", " ${3}", "}" ], "description": "async const function" }

Source: https://github.com/pawelgrzybek/snippet-generator

arun0808rana avatar May 24 '23 08:05 arun0808rana

PERFECT!

MarivateBasani avatar Jun 23 '24 00:06 MarivateBasani

Added snippet for async function because I need it a lot for what I'm doing (I have more async functions than sync). For shortcut, I have it as "asnfn", which is consistent with other functions where "fn" keyword is a suffix. If I could have, I'd have changed all function-based snippets to have "fn" as prefix instead of suffix, but can't change that now. Or can we? ;)

https://github.com/xabikos/vscode-javascript/pull/88#issuecomment-1560664011

MarivateBasani avatar Jun 23 '24 00:06 MarivateBasani