File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -1097,9 +1097,13 @@ export function createFromPreloadedConfig(
10971097 } ;
10981098
10991099 getTypeInfo = ( code : string , fileName : string , position : number ) => {
1100- updateMemoryCache ( code , fileName ) ;
1100+ const normalizedFileName = normalizeSlashes ( fileName ) ;
1101+ updateMemoryCache ( code , normalizedFileName ) ;
11011102
1102- const info = service . getQuickInfoAtPosition ( fileName , position ) ;
1103+ const info = service . getQuickInfoAtPosition (
1104+ normalizedFileName ,
1105+ position
1106+ ) ;
11031107 const name = ts . displayPartsToString ( info ? info . displayParts : [ ] ) ;
11041108 const comment = ts . displayPartsToString ( info ? info . documentation : [ ] ) ;
11051109
@@ -1283,9 +1287,10 @@ export function createFromPreloadedConfig(
12831287 } ;
12841288
12851289 getTypeInfo = ( code : string , fileName : string , position : number ) => {
1286- updateMemoryCache ( code , fileName ) ;
1290+ const normalizedFileName = normalizeSlashes ( fileName ) ;
1291+ updateMemoryCache ( code , normalizedFileName ) ;
12871292
1288- const sourceFile = builderProgram . getSourceFile ( fileName ) ;
1293+ const sourceFile = builderProgram . getSourceFile ( normalizedFileName ) ;
12891294 if ( ! sourceFile )
12901295 throw new TypeError ( `Unable to read file: ${ fileName } ` ) ;
12911296
You can’t perform that action at this time.
0 commit comments