From ece530adcf2f5970672cea1111da88ed021fe661 Mon Sep 17 00:00:00 2001 From: Jack Works Date: Thu, 28 May 2020 02:41:23 +0800 Subject: [PATCH] Update typescript.code-snippets (#98521) --- .../snippets/typescript.code-snippets | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/extensions/typescript-basics/snippets/typescript.code-snippets b/extensions/typescript-basics/snippets/typescript.code-snippets index 0a7195751d821..0b4f448a803ae 100644 --- a/extensions/typescript-basics/snippets/typescript.code-snippets +++ b/extensions/typescript-basics/snippets/typescript.code-snippets @@ -123,7 +123,7 @@ "Throw Exception": { "prefix": "throw", "body": [ - "throw \"$1\";", + "throw new Error(\"$1\");", "$0" ], "description": "Throw Exception" @@ -167,7 +167,16 @@ "}" ], "description": "For-Of Loop" - }, + }, + "For-Await-Of Loop": { + "prefix": "forawaitof", + "body": [ + "for await (const ${1:iterator} of ${2:object}) {", + "\t$0", + "}" + ], + "description": "For-Await-Of Loop" + }, "Function Statement": { "prefix": "function", "body": [