mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-11 02:03:59 +08:00
`class Sink extends EventEmitter<Map>` now compiles: the type argument of an EventEmitter base is the listener MAP, a pure typing aid (Node erases it too), so the base is the same emitter class whatever the map says. A stream base's argument IS the element layout and still refuses, as does every other generic base. The bundled fallback `events` module declares the class with an unconstrained map so interfaces typecheck against it, and its members stay the untyped `...args: any[]` surface either way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>