Created
February 16, 2020 18:14
-
-
Save Luxcium/b0e1816303a231c08230ed288044ebdc to your computer and use it in GitHub Desktop.
Async IIFE template
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
;(async () => { | |
// | |
/* code goese here */ | |
return void 0; | |
})().catch(error =>console.log('error message:', error.message)); |
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
{ | |
"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" | |
} | |
} |
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
[ | |
{ | |
"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