Extending Workspaceleaf throws undefined error

I want to create a new WorkspaceLeaf class. While calling super() in the constructor i get the following error.

TypeError: Cannot read properties of undefined (reading 'workspace')
    at new t (app.js:1:2206755)

The minified/obfuscated code isn’t helping me to debug this. There is no documentation for the Workspaceleaf constructor.

I don’t think you want to subclass WorkspaceLeaf. It sounds like you want to create a custom View. See this guide for instructions: Views - Developer Documentation