Skip to content

Instantly share code, notes, and snippets.

@Luxcium
Created February 16, 2020 18:14
Show Gist options
  • Save Luxcium/b0e1816303a231c08230ed288044ebdc to your computer and use it in GitHub Desktop.
Save Luxcium/b0e1816303a231c08230ed288044ebdc to your computer and use it in GitHub Desktop.
Async IIFE template
;(async () => {
//
/* code goese here */
return void 0;
})().catch(error =>console.log('error message:', error.message));
{
"Async_IIFE": {
"scope": "javascript,typescript",
"prefix": "aIIFE",
"body": [
";(async () => {",
" //",
" $TM_SELECTED_TEXT$0",
"",
" return void 0;",
"})().catch(error =>console.log('error message:', error.message));"
],
"description": "Async IIFE template"
}
}
[
{
"key": "alt+a",
"command": "editor.action.insertSnippet",
"when": "editorTextFocus",
"args": {
"langId": "typescript",
"name": "Async_IIFE"
}
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment