DEV Community

Discussion on: Typescript can be confusing

Collapse
 
pclundaahl profile image
Patrick Charles-Lundaahl

You're trying to mimic something like final in, e.g., Java, right? I know I've definitely found myself wishing for that before!

I feel like you might be able achieve the runtime behavior you're after with a proxy. You wouldn't get the type safety aspect, though, and I reckon the implementation would be ugly enough that you'd never want to use it.