@@ -533,8 +533,9 @@ module API {
533
533
534
534
/** Gets a node corresponding to an import of module `m`. */
535
535
Node moduleImport ( string m ) {
536
- result = Impl:: MkModuleImport ( m ) or
537
- result = Impl:: MkModuleImport ( m ) .( Node ) .getMember ( "default" )
536
+ result = Internal:: getAModuleImportRaw ( m )
537
+ or
538
+ result = ModelOutput:: getATypeNode ( m , "" )
538
539
}
539
540
540
541
/** Gets a node corresponding to an export of module `m`. */
@@ -544,6 +545,22 @@ module API {
544
545
module Node {
545
546
/** Gets a node whose type has the given qualified name. */
546
547
Node ofType ( string moduleName , string exportedName ) {
548
+ result = Internal:: getANodeOfTypeRaw ( moduleName , exportedName )
549
+ or
550
+ result = ModelOutput:: getATypeNode ( moduleName , exportedName )
551
+ }
552
+ }
553
+
554
+ /** Provides access to API graph nodes without taking into account types from models. */
555
+ module Internal {
556
+ /** Gets a node corresponding to an import of module `m` without taking into account types from models. */
557
+ Node getAModuleImportRaw ( string m ) {
558
+ result = Impl:: MkModuleImport ( m ) or
559
+ result = Impl:: MkModuleImport ( m ) .( Node ) .getMember ( "default" )
560
+ }
561
+
562
+ /** Gets a node whose type has the given qualified name, not including types from models. */
563
+ Node getANodeOfTypeRaw ( string moduleName , string exportedName ) {
547
564
result = Impl:: MkTypeUse ( moduleName , exportedName ) .( Node ) .getInstance ( )
548
565
}
549
566
}
0 commit comments