File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -196,10 +196,17 @@ export class FileIndexer {
196
196
. getResolvedSignature ( jsxElement )
197
197
?. getParameters ( ) ?. [ 0 ]
198
198
if ( props ) {
199
- const tpe = this . checker . getTypeOfSymbolAtLocation ( props , node )
200
- const property = tpe . getProperty ( node . name . text )
201
- for ( const decl of property ?. declarations || [ ] ) {
202
- return this . lsifSymbol ( decl )
199
+ try {
200
+ const tpe = this . checker . getTypeOfSymbolAtLocation ( props , node )
201
+ const property = tpe . getProperty ( node . name . text )
202
+ for ( const decl of property ?. declarations || [ ] ) {
203
+ return this . lsifSymbol ( decl )
204
+ }
205
+ } catch {
206
+ // TODO: https://github.com/sourcegraph/lsif-typescript/issues/34
207
+ // continue regardless of error, the TypeScript compiler tends to
208
+ // trigger stack overflows in getTypeOfSymbolAtLocation and we
209
+ // don't know why yet.
203
210
}
204
211
}
205
212
}
You can’t perform that action at this time.
0 commit comments