File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -861,6 +861,10 @@ namespace ts {
861861 return fileExtensionIs ( path , extension ) ? path . substring ( 0 , path . length - extension . length ) : undefined ;
862862 }
863863
864+ export function isJsxOrTsxExtension ( ext : string ) : boolean {
865+ return ext === ".jsx" || ext === ".tsx" ;
866+ }
867+
864868 export interface ObjectAllocator {
865869 getNodeConstructor ( ) : new ( kind : SyntaxKind , pos ?: number , end ?: number ) => Node ;
866870 getSourceFileConstructor ( ) : new ( kind : SyntaxKind , pos ?: number , end ?: number ) => SourceFile ;
Original file line number Diff line number Diff line change @@ -646,7 +646,7 @@ namespace ts {
646646 return forEach ( extensions , tryLoad ) ;
647647
648648 function tryLoad ( ext : string ) : string {
649- if ( state . skipTsx && ( ext === ".jsx" || ext === ".tsx" ) ) {
649+ if ( state . skipTsx && isJsxOrTsxExtension ( ext ) ) {
650650 return undefined ;
651651 }
652652 const fileName = fileExtensionIs ( candidate , ext ) ? candidate : candidate + ext ;
You can’t perform that action at this time.
0 commit comments