File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -119,10 +119,14 @@ export function register (opts?: Options) {
119119 )
120120 }
121121
122- function compile ( fileName : string ) {
122+ function addFileName ( fileName : string ) {
123123 // Add to the `files` object before compiling - otherwise our file will
124124 // not found (unless it's in our `tsconfig.json` file).
125125 files [ fileName ] = true
126+ }
127+
128+ function compile ( fileName : string ) {
129+ addFileName ( fileName )
126130
127131 const diagnostics = getDiagnostics ( service , fileName , options )
128132
@@ -145,6 +149,8 @@ export function register (opts?: Options) {
145149 }
146150
147151 function getTypeInfo ( fileName : string , position : number ) {
152+ addFileName ( fileName )
153+
148154 const info = service . getQuickInfoAtPosition ( fileName , position )
149155 const name = ts . displayPartsToString ( info . displayParts || [ ] )
150156 const comment = ts . displayPartsToString ( info . documentation || [ ] )
You can’t perform that action at this time.
0 commit comments