TypeScript-DOM-lib-generator
                                
                                 TypeScript-DOM-lib-generator copied to clipboard
                                
                                    TypeScript-DOM-lib-generator copied to clipboard
                            
                            
                            
                        fix: Mark `prototype` property of constructors as `readonly`
This more closely matches runtime behaviour.
It also causes code that would try to re‑assign the prototype property of WebIDL constructors to have the error caught at compile time, rather than at run time.
We think this is probably a bit too big of a change for its value, I agree that it better reflects reality (example below) but it's hard to gauge a potential breaks from something like this.
AbortController.prototype = () => {}
> () => {}
new AbortController()
> AbortController {signal: AbortSignal}
const a = new AbortController()
undefined
a
>  AbortController { 
  signal: AbortSignal {aborted: false, onabort: null} 
  __proto__: AbortController
}
We think this is probably a bit too big of a change for its value, I agree that it better reflects reality (example below) but it's hard to gauge a potential breaks from something like this.
I'm not sure I understand the reasoning here, your example looks like it will benefit from readonly? The reason it's silently ignoring reassignation of .prototype is because it's not in strict mode.
"use strict"; AbortController.prototype = () => {}
> Uncaught TypeError: "prototype" is read-only
(But I guess some polyfill can legally assign things to .prototype)