Re:TypeScript 5.2's New Keyword: 'using'
by junon on Monday June 19, 2023 @06:13AM
(#36389334)
Backwards compatibility. This can't conflict with existing types that have `dispose` on them already. Symbols are private, meaning two symbols with the same name are not the same symbol. Symbols use object reference equality, not value equality. So `Symbol.dispose` is the only way to refer to the dispose method they're looking for, without conflicting with any existing fields called "dispose".
[ Parent
| on HN ]
There are no comments on this comment yet.