You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---@return ${inheritedType} @The new Class table, inheriting from ${cls.name}
431
+
function ${cls.name}.Inherit(${params.names}) end`;
380
432
}
381
433
382
434
functiongenerateConstructorFunction(
@@ -420,6 +472,9 @@ function generateClassAnnotations(
420
472
inheritance=` : ${cls.inheritance.join(", ")}`;
421
473
}
422
474
475
+
constinherit=findInherit(classes,cls);
476
+
constisInheritable=inherit!==undefined;
477
+
423
478
constconstructors=
424
479
cls.constructors?.reduce(
425
480
(prev,constructor)=>
@@ -439,6 +494,11 @@ function generateClassAnnotations(
439
494
return;
440
495
}
441
496
497
+
// Redeclared below with the class as its return type
498
+
if(fun.name==="Inherit"&&inherit?.owner===cls){
499
+
return;
500
+
}
501
+
442
502
staticFunctions+=generateFunction(
443
503
jsonFileName,
444
504
fun,
@@ -572,7 +632,6 @@ function ${cls.name}.Unsubscribe(event_name, callback) end
572
632
}`;
573
633
}
574
634
575
-
constisInheritable=hasInherit(classes,cls);
576
635
letfields=!isInheritable
577
636
? ""
578
637
: `\n---@field Super ${cls.name} @Access to the original/native ${cls.name} methods from within an inherited Class (see the <a href="${INHERITING_SYSTEM_URL}">Inheriting System</a>)`;
@@ -610,14 +669,18 @@ function ${cls.name}.Unsubscribe(event_name, callback) end
0 commit comments