1/*@internal*/ 2namespace ts { 3 export function transformESNext(context: TransformationContext) { 4 return chainBundle(context, transformSourceFile); 5 6 function transformSourceFile(node: SourceFile) { 7 if (node.isDeclarationFile) { 8 return node; 9 } 10 11 return visitEachChild(node, visitor, context); 12 } 13 14 function visitor(node: Node): VisitResult<Node> { 15 if ((node.transformFlags & TransformFlags.ContainsESNext) === 0) { 16 return node; 17 } 18 switch (node.kind) { 19 default: 20 return visitEachChild(node, visitor, context); 21 } 22 } 23 } 24} 25