Like in every object oriented language, you can’t really change the inheritance chain of existing classes, so you need to add your own on top of the existing chain.
Yes, i’ve done the same thing, but in terminalService.onDidChangeCurrentTerminal((e: TerminalWidget) => {}) event, i want to add one more extra field e.xyz.