File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,8 @@ contact_links:
1111 -
1212 name : " Help! My Types Are Missing!"
1313 about : " This is likely a configuration problem. Check our README"
14- url : " https://typestrong.org/ts-node/docs/types"
14+ url : " https://typestrong.org/ts-node/docs/troubleshooting#missing- types"
1515 -
1616 name : " TSError or SyntaxError"
17- about : " These errors come from TypeScript and node, respectively. Use StackOverflow or Discord for usage and configuration help."
17+ about : " These errors come from TypeScript and node, respectively. Use Discussions or Discord for usage and configuration help."
1818 url : " https://typestrong.org/ts-node/docs/troubleshooting"
Original file line number Diff line number Diff line change @@ -1100,9 +1100,13 @@ export function createFromPreloadedConfig(
11001100 } ;
11011101
11021102 getTypeInfo = ( code : string , fileName : string , position : number ) => {
1103- updateMemoryCache ( code , fileName ) ;
1103+ const normalizedFileName = normalizeSlashes ( fileName ) ;
1104+ updateMemoryCache ( code , normalizedFileName ) ;
11041105
1105- const info = service . getQuickInfoAtPosition ( fileName , position ) ;
1106+ const info = service . getQuickInfoAtPosition (
1107+ normalizedFileName ,
1108+ position
1109+ ) ;
11061110 const name = ts . displayPartsToString ( info ? info . displayParts : [ ] ) ;
11071111 const comment = ts . displayPartsToString ( info ? info . documentation : [ ] ) ;
11081112
@@ -1286,9 +1290,10 @@ export function createFromPreloadedConfig(
12861290 } ;
12871291
12881292 getTypeInfo = ( code : string , fileName : string , position : number ) => {
1289- updateMemoryCache ( code , fileName ) ;
1293+ const normalizedFileName = normalizeSlashes ( fileName ) ;
1294+ updateMemoryCache ( code , normalizedFileName ) ;
12901295
1291- const sourceFile = builderProgram . getSourceFile ( fileName ) ;
1296+ const sourceFile = builderProgram . getSourceFile ( normalizedFileName ) ;
12921297 if ( ! sourceFile )
12931298 throw new TypeError ( `Unable to read file: ${ fileName } ` ) ;
12941299
You can’t perform that action at this time.
0 commit comments