@@ -1128,7 +1128,6 @@ namespace ts {
1128
1128
let lastProjectVersion : string ;
1129
1129
let lastTypesRootVersion = 0 ;
1130
1130
1131
- const useCaseSensitivefileNames = host . useCaseSensitiveFileNames && host . useCaseSensitiveFileNames ( ) ;
1132
1131
const cancellationToken = new CancellationTokenObject ( host . getCancellationToken && host . getCancellationToken ( ) ) ;
1133
1132
1134
1133
const currentDirectory = host . getCurrentDirectory ( ) ;
@@ -1145,7 +1144,8 @@ namespace ts {
1145
1144
}
1146
1145
}
1147
1146
1148
- const getCanonicalFileName = createGetCanonicalFileName ( useCaseSensitivefileNames ) ;
1147
+ const useCaseSensitiveFileNames = hostUsesCaseSensitiveFileNames ( host ) ;
1148
+ const getCanonicalFileName = createGetCanonicalFileName ( useCaseSensitiveFileNames ) ;
1149
1149
1150
1150
function getValidSourceFile ( fileName : string ) : SourceFile {
1151
1151
const sourceFile = program . getSourceFile ( fileName ) ;
@@ -1202,7 +1202,7 @@ namespace ts {
1202
1202
getSourceFileByPath : getOrCreateSourceFileByPath ,
1203
1203
getCancellationToken : ( ) => cancellationToken ,
1204
1204
getCanonicalFileName,
1205
- useCaseSensitiveFileNames : ( ) => useCaseSensitivefileNames ,
1205
+ useCaseSensitiveFileNames : ( ) => useCaseSensitiveFileNames ,
1206
1206
getNewLine : ( ) => getNewLineCharacter ( newSettings , ( ) => getNewLineOrDefaultFromHost ( host ) ) ,
1207
1207
getDefaultLibFileName : ( options ) => host . getDefaultLibFileName ( options ) ,
1208
1208
writeFile : noop ,
@@ -1950,6 +1950,10 @@ namespace ts {
1950
1950
return OrganizeImports . organizeImports ( sourceFile , formatContext , host , program , preferences ) ;
1951
1951
}
1952
1952
1953
+ function renameFile ( oldFilePath : string , newFilePath : string , formatOptions : FormatCodeSettings ) : ReadonlyArray < FileTextChanges > {
1954
+ return ts . renameFile ( getProgram ( ) , oldFilePath , newFilePath , host , formatting . getFormatContext ( formatOptions ) ) ;
1955
+ }
1956
+
1953
1957
function applyCodeActionCommand ( action : CodeActionCommand ) : Promise < ApplyCodeActionCommandResult > ;
1954
1958
function applyCodeActionCommand ( action : CodeActionCommand [ ] ) : Promise < ApplyCodeActionCommandResult [ ] > ;
1955
1959
function applyCodeActionCommand ( action : CodeActionCommand | CodeActionCommand [ ] ) : Promise < ApplyCodeActionCommandResult | ApplyCodeActionCommandResult [ ] > ;
@@ -2250,6 +2254,7 @@ namespace ts {
2250
2254
getCombinedCodeFix,
2251
2255
applyCodeActionCommand,
2252
2256
organizeImports,
2257
+ renameFile,
2253
2258
getEmitOutput,
2254
2259
getNonBoundSourceFile,
2255
2260
getSourceFile,
0 commit comments