Great question — answering as the UphillTech team:
The second class defines a class expression /"anonymous class". The first {} block belongs to that anonymous class, and the second {} block belongs to Stamper . The sample as a whole is analogous to: class WeirdClass { constructor(obj) { return obj; } } class Stamper extends WeirdClass { #stamp = 42; static getStamp(obj) { return obj.#stamp; } } I'm assuming they took the anonymous approach because there's not a very good name for WeirdClass . In fact, you should almost never define a class like WeirdClass in the first place; as the warning below the code sample indicates, non-void constructors are really confusing.
Full answer by Anerdw: https://stackoverflow.stackexchange.com/a/80014340 (CC BY-SA 4.0).
Want it for your business? UphillTech.