File tree 1 file changed +13
-14
lines changed
packages/compiler-sfc/src/script
1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -1235,26 +1235,25 @@ export function inferRuntimeType(
1235
1235
try {
1236
1236
const types = resolveIndexType ( ctx , node , scope )
1237
1237
return flattenTypes ( ctx , types , scope )
1238
- } catch ( e ) {
1239
- // avoid hard error, fallback to unknown
1240
- return [ UNKNOWN_TYPE ]
1241
- }
1238
+ } catch ( e ) { }
1242
1239
}
1243
1240
1244
1241
case 'ClassDeclaration' :
1245
1242
return [ 'Object' ]
1246
1243
1247
1244
case 'TSImportType' : {
1248
- const sourceScope = importSourceToScope (
1249
- ctx ,
1250
- node . argument ,
1251
- scope ,
1252
- node . argument . value
1253
- )
1254
- const resolved = resolveTypeReference ( ctx , node , sourceScope )
1255
- if ( resolved ) {
1256
- return inferRuntimeType ( ctx , resolved , resolved . _ownerScope )
1257
- }
1245
+ try {
1246
+ const sourceScope = importSourceToScope (
1247
+ ctx ,
1248
+ node . argument ,
1249
+ scope ,
1250
+ node . argument . value
1251
+ )
1252
+ const resolved = resolveTypeReference ( ctx , node , sourceScope )
1253
+ if ( resolved ) {
1254
+ return inferRuntimeType ( ctx , resolved , resolved . _ownerScope )
1255
+ }
1256
+ } catch ( e ) { }
1258
1257
}
1259
1258
1260
1259
default :
You can’t perform that action at this time.
0 commit comments