File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
javascript/ql/lib/semmle/javascript Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -649,11 +649,13 @@ module API {
649
649
/** Gets a node corresponding to an import of module `m` without taking into account types from models. */
650
650
Node getAModuleImportRaw ( string m ) {
651
651
result = Impl:: MkModuleImport ( m ) or
652
- result = Impl:: MkModuleImport ( m ) .( Node ) .getMember ( "default" )
652
+ result = Impl:: MkModuleImport ( m ) .( Node ) .getMember ( "default" ) or
653
+ result = Impl:: MkTypeUse ( m , "" )
653
654
}
654
655
655
656
/** Gets a node whose type has the given qualified name, not including types from models. */
656
657
Node getANodeOfTypeRaw ( string moduleName , string exportedName ) {
658
+ exportedName != "" and
657
659
result = Impl:: MkTypeUse ( moduleName , exportedName ) .( Node ) .getInstance ( )
658
660
or
659
661
exportedName = "" and
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ API::Node getExtraNodeFromType(string type) {
138
138
parseRelevantTypeString ( type , package , qualifiedName )
139
139
|
140
140
qualifiedName = "" and
141
- result = [ API:: moduleImport ( package ) , API:: moduleExport ( package ) ]
141
+ result = [ API:: Internal :: getAModuleImportRaw ( package ) , API:: moduleExport ( package ) ]
142
142
or
143
143
// Access instance of a type based on type annotations
144
144
result = API:: Internal:: getANodeOfTypeRaw ( package , qualifiedName )
You can’t perform that action at this time.
0 commit comments