Hacker News new | ask | show | jobs
by Parsyval 2998 days ago
Since I work with Typescript, I do the same with the TS playground, it's really usefull to learn that kind of stuff.
1 comments

I sometimes see difference between TypeScript's compiler and babel.

For example in this case TypeScript doesn't care so much about `defineProperty`. I guess the rules are not so strict, since it assumes that the rest of your code will be passed through TypeScript itself.

Anyway in both cases, I prefer TypeScript's way of enhancing the class inheritance in JavaScript by introducing private / readonly and many more.

https://www.typescriptlang.org/play/index.html#src=class%20D...