Login
From:
fettblog.eu
(Uncensored)
subscribe
TypeScript: Assertion signatures and Object.defineProperty
https://fettblog.eu/typescript-assertion-signatures/
links
backlinks
Roast topics
Find topics
Find it!
In JavaScript, you can define object properties on the fly with Object.defineProperty. This is useful if you want your properties to be read-only or similar. Think of a storage object that has a maximum value that shouldn’t be overwritten: