DEV Community

Discussion on: Advanced TypeScript Exercises - Answer 7

Collapse
 
macsikora profile image
Pragmatic Maciej

Good hack Rahul. Unfortunately you can also do the same for all these solution and hack them. I don't think it is possible to prevent such, in the same way we can hack almost every type by as any as X thing.

In any way I think the wanted behavior was achieved, even though we can hack it, the hack is explicitly visible in the code.

But thanks for the comment!