@@ -192,6 +192,7 @@ import {
192
192
getParseTreeNode ,
193
193
getPathComponents ,
194
194
getPathFromPathComponents ,
195
+ getRelativePathFromDirectory ,
195
196
getRelativePathToDirectoryOrUrl ,
196
197
getResolutionModeOverride ,
197
198
getRootLength ,
@@ -471,6 +472,7 @@ import {
471
472
ResolvedModuleWithFailedLookupLocations ,
472
473
ResolvedTypeReferenceDirective ,
473
474
ResolvedTypeReferenceDirectiveWithFailedLookupLocations ,
475
+ resolvePath ,
474
476
ReturnStatement ,
475
477
SatisfiesExpression ,
476
478
ScriptKind ,
@@ -6288,6 +6290,21 @@ export function getPossibleOriginalInputExtensionForExtension(path: string) {
6288
6290
[ Extension . Tsx , Extension . Ts , Extension . Jsx , Extension . Js ] ;
6289
6291
}
6290
6292
6293
+ /** @internal */
6294
+ export function getPossibleOriginalInputPathWithoutChangingExt (
6295
+ filePath : string ,
6296
+ ignoreCase : boolean ,
6297
+ outputDir : string | undefined ,
6298
+ getCommonSourceDirectory : ( ) => string ,
6299
+ ) : string {
6300
+ return outputDir ?
6301
+ resolvePath (
6302
+ getCommonSourceDirectory ( ) ,
6303
+ getRelativePathFromDirectory ( outputDir , filePath , ignoreCase ) ,
6304
+ ) :
6305
+ filePath ;
6306
+ }
6307
+
6291
6308
/**
6292
6309
* Returns 'undefined' if and only if 'options.paths' is undefined.
6293
6310
*
0 commit comments