mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-05 08:13:06 +08:00
`const E = EventEmitter`, `const M = Map`, `const T = TypeError` and `const R = Readable` stopped at SC2020, and so did `typeof EventEmitter`, `Readable.name`, `Map.name`, `Error.name` and `===` between builtin classes. The zlib class alias resolver now covers the error classes, EventEmitter, the node:stream classes and Map/Set: a const binding of one (an alias of an alias, or an export used through a named or namespace import) constructs, extends and tests instanceof like the direct name, and typeof, .name and === fold for aliases and direct names. In TypeScript files the alias owns no runtime slot and other value uses report SC1090 at the use. In JavaScript files a copy of a name or of a globalThis property keeps its slot, which holds the same value as the name it copies; builtin module members (`zlib.Gzip`) own none, as before.