@@ -259,7 +259,7 @@ namespace ts {
259
259
case SyntaxKind . ExportAssignment :
260
260
return ( < ExportAssignment > node ) . isExportEquals ? "export=" : "default" ;
261
261
case SyntaxKind . BinaryExpression :
262
- switch ( getSpecialPropertyAssignmentKind ( node ) ) {
262
+ switch ( getSpecialPropertyAssignmentKind ( node as BinaryExpression ) ) {
263
263
case SpecialPropertyAssignmentKind . ModuleExports :
264
264
// module.exports = ...
265
265
return "export=" ;
@@ -2017,30 +2017,28 @@ namespace ts {
2017
2017
}
2018
2018
break ;
2019
2019
case SyntaxKind . BinaryExpression :
2020
- if ( isInJavaScriptFile ( node ) ) {
2021
- const specialKind = getSpecialPropertyAssignmentKind ( node ) ;
2022
- switch ( specialKind ) {
2023
- case SpecialPropertyAssignmentKind . ExportsProperty :
2024
- bindExportsPropertyAssignment ( < BinaryExpression > node ) ;
2025
- break ;
2026
- case SpecialPropertyAssignmentKind . ModuleExports :
2027
- bindModuleExportsAssignment ( < BinaryExpression > node ) ;
2028
- break ;
2029
- case SpecialPropertyAssignmentKind . PrototypeProperty :
2030
- bindPrototypePropertyAssignment ( < BinaryExpression > node ) ;
2031
- break ;
2032
- case SpecialPropertyAssignmentKind . ThisProperty :
2033
- bindThisPropertyAssignment ( < BinaryExpression > node ) ;
2034
- break ;
2035
- case SpecialPropertyAssignmentKind . Property :
2036
- bindStaticPropertyAssignment ( < BinaryExpression > node ) ;
2037
- break ;
2038
- case SpecialPropertyAssignmentKind . None :
2039
- // Nothing to do
2040
- break ;
2041
- default :
2042
- Debug . fail ( "Unknown special property assignment kind" ) ;
2043
- }
2020
+ const specialKind = getSpecialPropertyAssignmentKind ( node as BinaryExpression ) ;
2021
+ switch ( specialKind ) {
2022
+ case SpecialPropertyAssignmentKind . ExportsProperty :
2023
+ bindExportsPropertyAssignment ( < BinaryExpression > node ) ;
2024
+ break ;
2025
+ case SpecialPropertyAssignmentKind . ModuleExports :
2026
+ bindModuleExportsAssignment ( < BinaryExpression > node ) ;
2027
+ break ;
2028
+ case SpecialPropertyAssignmentKind . PrototypeProperty :
2029
+ bindPrototypePropertyAssignment ( < BinaryExpression > node ) ;
2030
+ break ;
2031
+ case SpecialPropertyAssignmentKind . ThisProperty :
2032
+ bindThisPropertyAssignment ( < BinaryExpression > node ) ;
2033
+ break ;
2034
+ case SpecialPropertyAssignmentKind . Property :
2035
+ bindStaticPropertyAssignment ( < BinaryExpression > node ) ;
2036
+ break ;
2037
+ case SpecialPropertyAssignmentKind . None :
2038
+ // Nothing to do
2039
+ break ;
2040
+ default :
2041
+ Debug . fail ( "Unknown special property assignment kind" ) ;
2044
2042
}
2045
2043
return checkStrictModeBinaryExpression ( < BinaryExpression > node ) ;
2046
2044
case SyntaxKind . CatchClause :
0 commit comments