File tree 1 file changed +9
-4
lines changed
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1097,9 +1097,13 @@ export function createFromPreloadedConfig(
1097
1097
} ;
1098
1098
1099
1099
getTypeInfo = ( code : string , fileName : string , position : number ) => {
1100
- updateMemoryCache ( code , fileName ) ;
1100
+ const normalizedFileName = normalizeSlashes ( fileName ) ;
1101
+ updateMemoryCache ( code , normalizedFileName ) ;
1101
1102
1102
- const info = service . getQuickInfoAtPosition ( fileName , position ) ;
1103
+ const info = service . getQuickInfoAtPosition (
1104
+ normalizedFileName ,
1105
+ position
1106
+ ) ;
1103
1107
const name = ts . displayPartsToString ( info ? info . displayParts : [ ] ) ;
1104
1108
const comment = ts . displayPartsToString ( info ? info . documentation : [ ] ) ;
1105
1109
@@ -1283,9 +1287,10 @@ export function createFromPreloadedConfig(
1283
1287
} ;
1284
1288
1285
1289
getTypeInfo = ( code : string , fileName : string , position : number ) => {
1286
- updateMemoryCache ( code , fileName ) ;
1290
+ const normalizedFileName = normalizeSlashes ( fileName ) ;
1291
+ updateMemoryCache ( code , normalizedFileName ) ;
1287
1292
1288
- const sourceFile = builderProgram . getSourceFile ( fileName ) ;
1293
+ const sourceFile = builderProgram . getSourceFile ( normalizedFileName ) ;
1289
1294
if ( ! sourceFile )
1290
1295
throw new TypeError ( `Unable to read file: ${ fileName } ` ) ;
1291
1296
You can’t perform that action at this time.
0 commit comments