File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
javascript/ql/lib/semmle/javascript Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -735,6 +735,14 @@ module API {
735735 */
736736 cached
737737 private module Impl {
738+ private predicate hasTypeUse(string moduleName, string exportName) {
739+ any(TypeAnnotation n).hasUnderlyingType(moduleName, exportName)
740+ }
741+
742+ overlay[local]
743+ private predicate hasTypeUseLocal(string moduleName, string exportName) =
744+ forceLocal(hasTypeUse/2)(moduleName, exportName)
745+
738746 overlay[local]
739747 cached
740748 newtype TApiNode =
@@ -771,10 +779,7 @@ module API {
771779 } or
772780 MkUse(DataFlow::Node nd) { nd instanceof DataFlow::SourceNode } or
773781 /** A use of a TypeScript type. */
774- MkTypeUse(string moduleName, string exportName) {
775- // any(TypeAnnotation n).hasUnderlyingType(moduleName, exportName)
776- none() // TODO
777- } or
782+ MkTypeUse(string moduleName, string exportName) { hasTypeUseLocal(moduleName, exportName) } or
778783 MkSyntheticCallbackArg(DataFlow::InvokeNode nd)
779784
780785 class TDef = MkModuleDef or TNonModuleDef;
You can’t perform that action at this time.
0 commit comments