File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -260,18 +260,9 @@ namespace ts {
260260 case SyntaxKind . ExportAssignment :
261261 return ( < ExportAssignment > node ) . isExportEquals ? "export=" : "default" ;
262262 case SyntaxKind . BinaryExpression :
263- switch ( getSpecialPropertyAssignmentKind ( node as BinaryExpression ) ) {
264- case SpecialPropertyAssignmentKind . ModuleExports :
265- // module.exports = ...
266- return "export=" ;
267- case SpecialPropertyAssignmentKind . ExportsProperty :
268- case SpecialPropertyAssignmentKind . ThisProperty :
269- case SpecialPropertyAssignmentKind . Property :
270- // exports.x = ... or this.y = ...
271- return ( ( node as BinaryExpression ) . left as PropertyAccessExpression ) . name . text ;
272- case SpecialPropertyAssignmentKind . PrototypeProperty :
273- // className.prototype.methodName = ...
274- return ( ( ( node as BinaryExpression ) . left as PropertyAccessExpression ) . expression as PropertyAccessExpression ) . name . text ;
263+ if ( getSpecialPropertyAssignmentKind ( node as BinaryExpression ) === SpecialPropertyAssignmentKind . ModuleExports ) {
264+ // module.exports = ...
265+ return "export=" ;
275266 }
276267 Debug . fail ( "Unknown binary declaration kind" ) ;
277268 break ;
You can’t perform that action at this time.
0 commit comments