Re:TypeScript: Branded Types
by thepaulmcbride on Wednesday April 24, 2024 @07:22PM
(#40151152)
Yep, you’re absolutely right
Re:TypeScript: Branded Types
by chrismorgan on Thursday April 25, 2024 @03:56AM
(#40154712)
foo.constructor actually doesn’t matter; foo.__proto__ == Foo.prototype is the one that actually makes things chug, and you can change the class of a value by changing its __proto__.
Although classes and instances are ultimately structural, right?