From 05043332f8e0188986770596d4b1809f3045cf8c Mon Sep 17 00:00:00 2001 From: Quan Zhuo Date: Fri, 6 May 2022 00:38:07 +0800 Subject: [PATCH] Add newpromise snippets in javascript (#148755) --- extensions/javascript/snippets/javascript.code-snippets | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/extensions/javascript/snippets/javascript.code-snippets b/extensions/javascript/snippets/javascript.code-snippets index 47a6f40d202..9448fd140d9 100644 --- a/extensions/javascript/snippets/javascript.code-snippets +++ b/extensions/javascript/snippets/javascript.code-snippets @@ -190,5 +190,14 @@ "console.error($1);" ], "description": "Log error to the console" + }, + "new Promise": { + "prefix": "newpromise", + "body": [ + "new Promise((resolve, reject) => {", + "\t$TM_SELECTED_TEXT$0", + "})" + ], + "description": "Create a new Promise" } }