@@ -460,7 +460,6 @@ module API {
460
460
this = Impl:: MkClassInstance ( result ) or
461
461
this = Impl:: MkUse ( result ) or
462
462
this = Impl:: MkDef ( result ) or
463
- this = Impl:: MkAsyncFuncResult ( result ) or
464
463
this = Impl:: MkSyntheticCallbackArg ( _, _, result )
465
464
}
466
465
@@ -671,9 +670,6 @@ module API {
671
670
cls .getAnInstanceReference ( ) = trackDefNode ( _)
672
671
)
673
672
} or
674
- MkAsyncFuncResult ( DataFlow:: FunctionNode f ) {
675
- f = trackDefNode ( _) and f .getFunction ( ) .isAsync ( ) and hasSemantics ( f )
676
- } or
677
673
MkDef ( DataFlow:: Node nd ) { rhs ( _, _, nd ) } or
678
674
MkUse ( DataFlow:: Node nd ) { use ( _, _, nd ) } or
679
675
/** A use of a TypeScript type. */
@@ -688,8 +684,7 @@ module API {
688
684
689
685
class TDef = MkModuleDef or TNonModuleDef ;
690
686
691
- class TNonModuleDef =
692
- MkModuleExport or MkClassInstance or MkAsyncFuncResult or MkDef or MkSyntheticCallbackArg ;
687
+ class TNonModuleDef = MkModuleExport or MkClassInstance or MkDef or MkSyntheticCallbackArg ;
693
688
694
689
class TUse = MkModuleUse or MkModuleImport or MkUse or MkTypeUse ;
695
690
@@ -740,10 +735,11 @@ module API {
740
735
rhs = m .getAnExportedValue ( prop )
741
736
)
742
737
or
743
- exists ( DataFlow:: FunctionNode fn | fn = pred |
744
- not fn .getFunction ( ) .isAsync ( ) and
745
- lbl = Label:: return ( ) and
746
- rhs = fn .getAReturn ( )
738
+ exists ( DataFlow:: FunctionNode fn |
739
+ fn = pred and
740
+ lbl = Label:: return ( )
741
+ |
742
+ if fn .getFunction ( ) .isAsync ( ) then rhs = fn .getReturnNode ( ) else rhs = fn .getAReturn ( )
747
743
)
748
744
or
749
745
lbl = Label:: promised ( ) and
@@ -774,13 +770,12 @@ module API {
774
770
)
775
771
or
776
772
exists ( DataFlow:: FunctionNode f |
777
- base = MkAsyncFuncResult ( f ) and
773
+ f .getFunction ( ) .isAsync ( ) and
774
+ base = MkDef ( f .getReturnNode ( ) )
775
+ |
778
776
lbl = Label:: promised ( ) and
779
777
rhs = f .getAReturn ( )
780
- )
781
- or
782
- exists ( DataFlow:: FunctionNode f |
783
- base = MkAsyncFuncResult ( f ) and
778
+ or
784
779
lbl = Label:: promisedError ( ) and
785
780
rhs = f .getExceptionalReturn ( )
786
781
)
@@ -1272,10 +1267,11 @@ module API {
1272
1267
)
1273
1268
or
1274
1269
exists ( DataFlow:: Node nd , DataFlow:: FunctionNode f |
1270
+ f .getFunction ( ) .isAsync ( ) and
1275
1271
pred = MkDef ( nd ) and
1276
1272
f = trackDefNode ( nd ) and
1277
1273
lbl = Label:: return ( ) and
1278
- succ = MkAsyncFuncResult ( f )
1274
+ succ = MkDef ( f . getReturnNode ( ) )
1279
1275
)
1280
1276
or
1281
1277
exists ( int bound , DataFlow:: InvokeNode call |
0 commit comments