@@ -230,10 +230,6 @@ namespace ts {
230230 // ES6 export and default modifiers are elided when inside a namespace.
231231 return currentNamespace ? undefined : node ;
232232
233- // Typescript ES2017 async/await are handled by ES2017 transformer
234- case SyntaxKind . AsyncKeyword :
235- return node ;
236-
237233 case SyntaxKind . PublicKeyword :
238234 case SyntaxKind . PrivateKeyword :
239235 case SyntaxKind . ProtectedKeyword :
@@ -297,7 +293,6 @@ namespace ts {
297293 // - property declarations
298294 // - index signatures
299295 // - method overload signatures
300- // - async methods
301296 return visitClassDeclaration ( < ClassDeclaration > node ) ;
302297
303298 case SyntaxKind . ClassExpression :
@@ -310,7 +305,6 @@ namespace ts {
310305 // - property declarations
311306 // - index signatures
312307 // - method overload signatures
313- // - async methods
314308 return visitClassExpression ( < ClassExpression > node ) ;
315309
316310 case SyntaxKind . HeritageClause :
@@ -325,7 +319,7 @@ namespace ts {
325319 return visitExpressionWithTypeArguments ( < ExpressionWithTypeArguments > node ) ;
326320
327321 case SyntaxKind . MethodDeclaration :
328- // TypeScript method declarations may be 'async', and may have decorators, modifiers
322+ // TypeScript method declarations may have decorators, modifiers
329323 // or type annotations.
330324 return visitMethodDeclaration ( < MethodDeclaration > node ) ;
331325
@@ -334,19 +328,19 @@ namespace ts {
334328 return visitGetAccessor ( < GetAccessorDeclaration > node ) ;
335329
336330 case SyntaxKind . SetAccessor :
337- // Set Accessors can have TypeScript modifiers, decorators, and type annotations.
331+ // Set Accessors can have TypeScript modifiers and type annotations.
338332 return visitSetAccessor ( < SetAccessorDeclaration > node ) ;
339333
340334 case SyntaxKind . FunctionDeclaration :
341- // TypeScript function declarations may be 'async'
335+ // Typescript function declarations can have modifiers, decorators, and type annotations.
342336 return visitFunctionDeclaration ( < FunctionDeclaration > node ) ;
343337
344338 case SyntaxKind . FunctionExpression :
345- // TypeScript function expressions may be 'async'
339+ // TypeScript function expressions can have modifiers and type annotations.
346340 return visitFunctionExpression ( < FunctionExpression > node ) ;
347341
348342 case SyntaxKind . ArrowFunction :
349- // TypeScript arrow functions may be 'async'
343+ // TypeScript arrow functions can have modifiers and type annotations.
350344 return visitArrowFunction ( < ArrowFunction > node ) ;
351345
352346 case SyntaxKind . Parameter :
@@ -378,10 +372,6 @@ namespace ts {
378372 // TypeScript enum declarations do not exist in ES6 and must be rewritten.
379373 return visitEnumDeclaration ( < EnumDeclaration > node ) ;
380374
381- case SyntaxKind . AwaitExpression :
382- // Typescript ES2017 async/await are handled by ES2017 transformer
383- return visitAwaitExpression ( < AwaitExpression > node ) ;
384-
385375 case SyntaxKind . VariableStatement :
386376 // TypeScript namespace exports for variable statements must be transformed.
387377 return visitVariableStatement ( < VariableStatement > node ) ;
@@ -2050,7 +2040,7 @@ namespace ts {
20502040 *
20512041 * This function will be called when one of the following conditions are met:
20522042 * - The node is an overload
2053- * - The node is marked as abstract, async, public, private, protected, or readonly
2043+ * - The node is marked as abstract, public, private, protected, or readonly
20542044 * - The node has both a decorator and a computed property name
20552045 *
20562046 * @param node The method node.
@@ -2161,8 +2151,8 @@ namespace ts {
21612151 *
21622152 * This function will be called when one of the following conditions are met:
21632153 * - The node is an overload
2164- * - The node is marked async
21652154 * - The node is exported from a TypeScript namespace
2155+ * - The node has decorators
21662156 *
21672157 * @param node The function node.
21682158 */
@@ -2197,7 +2187,7 @@ namespace ts {
21972187 * Visits a function expression node.
21982188 *
21992189 * This function will be called when one of the following conditions are met:
2200- * - The node is marked async
2190+ * - The node has type annotations
22012191 *
22022192 * @param node The function expression node.
22032193 */
@@ -2216,10 +2206,6 @@ namespace ts {
22162206 /*location*/ node
22172207 ) ;
22182208
2219- // Keep modifiers in case of async functions
2220- const funcModifiers = visitNodes ( node . modifiers , visitor , isModifier ) ;
2221- func . modifiers = createNodeArray ( funcModifiers ) ;
2222-
22232209 setOriginalNode ( func , node ) ;
22242210
22252211 return func ;
@@ -2228,7 +2214,7 @@ namespace ts {
22282214 /**
22292215 * @remarks
22302216 * This function will be called when one of the following conditions are met:
2231- * - The node is marked async
2217+ * - The node has type annotations
22322218 */
22332219 function visitArrowFunction ( node : ArrowFunction ) {
22342220 const func = createArrowFunction (
@@ -2368,23 +2354,6 @@ namespace ts {
23682354 }
23692355 }
23702356
2371- /**
2372- * Visits an await expression.
2373- *
2374- * This function will be called any time a ES2017 await expression is encountered.
2375- *
2376- * @param node The await expression node.
2377- */
2378- function visitAwaitExpression ( node : AwaitExpression ) : Expression {
2379- return updateNode (
2380- createAwait (
2381- visitNode ( node . expression , visitor , isExpression ) ,
2382- /*location*/ node
2383- ) ,
2384- node
2385- ) ;
2386- }
2387-
23882357 /**
23892358 * Visits a parenthesized expression that contains either a type assertion or an `as`
23902359 * expression.
0 commit comments