@@ -6738,7 +6738,7 @@ namespace ts {
6738
6738
}
6739
6739
6740
6740
/**
6741
- * List of supported extensions in order of file resolution precedence.
6741
+ * Groups of supported extensions in order of file resolution precedence. (eg, TS > TSX > DTS and seperately, CTS > DCTS)
6742
6742
*/
6743
6743
export const supportedTSExtensions : readonly Extension [ ] [ ] = [ [ Extension . Ts , Extension . Tsx , Extension . Dts ] , [ Extension . Cts , Extension . Dcts ] , [ Extension . Mts , Extension . Dmts ] ] ;
6744
6744
export const supportedTSExtensionsFlat : readonly Extension [ ] = flatten ( supportedTSExtensions ) ;
@@ -6769,9 +6769,9 @@ namespace ts {
6769
6769
return extensions ;
6770
6770
}
6771
6771
6772
- export function getSuppoertedExtensionsWithJsonIfResolveJsonModule ( options : CompilerOptions | undefined , supportedExtensions : readonly Extension [ ] [ ] ) : readonly Extension [ ] [ ] ;
6773
- export function getSuppoertedExtensionsWithJsonIfResolveJsonModule ( options : CompilerOptions | undefined , supportedExtensions : readonly string [ ] [ ] ) : readonly string [ ] [ ] ;
6774
- export function getSuppoertedExtensionsWithJsonIfResolveJsonModule ( options : CompilerOptions | undefined , supportedExtensions : readonly string [ ] [ ] ) : readonly string [ ] [ ] {
6772
+ export function getSupportedExtensionsWithJsonIfResolveJsonModule ( options : CompilerOptions | undefined , supportedExtensions : readonly Extension [ ] [ ] ) : readonly Extension [ ] [ ] ;
6773
+ export function getSupportedExtensionsWithJsonIfResolveJsonModule ( options : CompilerOptions | undefined , supportedExtensions : readonly string [ ] [ ] ) : readonly string [ ] [ ] ;
6774
+ export function getSupportedExtensionsWithJsonIfResolveJsonModule ( options : CompilerOptions | undefined , supportedExtensions : readonly string [ ] [ ] ) : readonly string [ ] [ ] {
6775
6775
if ( ! options || ! options . resolveJsonModule ) return supportedExtensions ;
6776
6776
if ( supportedExtensions === allSupportedExtensions ) return allSupportedExtensionsWithJson ;
6777
6777
if ( supportedExtensions === supportedTSExtensions ) return supportedTSExtensionsWithJson ;
@@ -6794,7 +6794,7 @@ namespace ts {
6794
6794
if ( ! fileName ) return false ;
6795
6795
6796
6796
const supportedExtensions = getSupportedExtensions ( compilerOptions , extraFileExtensions ) ;
6797
- for ( const extension of flatten ( getSuppoertedExtensionsWithJsonIfResolveJsonModule ( compilerOptions , supportedExtensions ) ) ) {
6797
+ for ( const extension of flatten ( getSupportedExtensionsWithJsonIfResolveJsonModule ( compilerOptions , supportedExtensions ) ) ) {
6798
6798
if ( fileExtensionIs ( fileName , extension ) ) {
6799
6799
return true ;
6800
6800
}
0 commit comments