@@ -466,11 +466,11 @@ Neo = globalThis.Neo = Object.assign({
466466 proto = cls . prototype || cls ,
467467 ns = Neo . ns ( proto . constructor . config . className , false ) ,
468468 protos = [ ] ,
469- cfg , config , ctor , ntype ;
469+ cfg , config , ctor , hierarchyInfo , ntype ;
470470
471471 /*
472472 * If the namespace already exists, directly return it.
473- * This can happen when using different versions of neo .mjs
473+ * This can happen when using different versions of Neo .mjs
474474 * => Especially singletons (IdGenerator) must stay unique.
475475 *
476476 * This can also happen when using different environments of neo.mjs in parallel.
@@ -574,6 +574,19 @@ Neo = globalThis.Neo = Object.assign({
574574
575575 proto = cls . prototype || cls ;
576576
577+ hierarchyInfo = {
578+ className : proto . className ,
579+ ntype : Object . hasOwn ( proto , 'ntype' ) ? proto . ntype : null ,
580+ parentClassName : proto . __proto__ ?. className || null
581+ } ;
582+
583+ if ( Neo . manager ?. ClassHierarchy ) {
584+ Neo . manager . ClassHierarchy . add ( hierarchyInfo )
585+ } else {
586+ Neo . classHierarchyMap ??= { } ;
587+ Neo . classHierarchyMap [ proto . className ] = hierarchyInfo
588+ }
589+
577590 ntypeChain . forEach ( ntype => {
578591 proto [ `is${ Neo . capitalize ( Neo . camel ( ntype ) ) } ` ] = true
579592 } ) ;
0 commit comments