File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -260,18 +260,9 @@ namespace ts {
260
260
case SyntaxKind . ExportAssignment :
261
261
return ( < ExportAssignment > node ) . isExportEquals ? "export=" : "default" ;
262
262
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=" ;
275
266
}
276
267
Debug . fail ( "Unknown binary declaration kind" ) ;
277
268
break ;
You can’t perform that action at this time.
0 commit comments