Member Junction
    Preparing search index...
    • Decorate your class with this to register it with the MJGlobal class factory.

      Classic positional form. The fifth and earlier parameters are unchanged from the original signature — existing call sites keep working byte-for-byte.

      Parameters

      • baseClass: unknown

        A reference to the base class you are registering a sub-class for

      • key: string | null = null

        A string used to retrieve a given registration. Should be unique per baseClass/key combination; if multiple registrations exist for a given baseClass/key, the highest priority registration wins at lookup time.

      • priority: number = 0

        Higher priority registrations beat lower. If unset (or 0), the priority is auto-incremented based on the highest existing priority for the same baseClass/key — so later registrations naturally win, which is the standard dependency-injection-by-import-order pattern.

      • skipNullKeyWarning: boolean = false

        If true, suppresses the "registration has no key" console warning. Useful when null keys are intentional.

      • autoRegisterWithRootClass: boolean = false

        If true, also registers against the root class of the hierarchy in addition to baseClass.

      • Optionalmetadata: Record<string, unknown>

        Optional structured metadata persisted on the ClassRegistration. Used for filterable / sortable discovery via ClassFactory.GetAllRegistrationsByMetadata. Common shape: { entity, slot, sortKey } for form-panel slots. For new code, prefer the RegisterClassEx options-bag form.

      Returns (constructor: Function) => void

      Prefer RegisterClassEx for new code when you have anything beyond (baseClass, key, priority) to specify — the options-bag signature scales much better than positional booleans, and it's the natural place to attach the structured metadata bag used by dynamic discovery features (form-panel slots, etc.). The metadata positional param here is provided for parity and brevity, but reads worse than { metadata: {...} } once the decorator wraps onto multiple lines.