Roast topics
Find topics
Roast it!
Roast topics
Find topics
Find it!
Login
From:
oida.dev | TypeScript, Rust
(Uncensored)
subscribe
TypeScript: Assertion signatures and Object.defineProperty
https://oida.dev/typescript-assertion-signatures/
links
backlinks
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: