JSFiddle - React, Tailwind, and code Playground

HTML

<div id="output">

</div>

JavaScript

// base.js
class Base {
    constructor(arg) {
        this.arg = arg;
    }

    // This is the behaviour I'm after
    static afterDefined(cls) {
        document.getElementById('output').innerHTML = `Class name ${cls.name}`;
    }
}

// frombase.js
class FromBase extends Base {
}
// just after defining the FromBase class
Base.afterDefined(FromBase);