3 ms·
Since I work with Typescript, I do the same with the TS playground, it's really usefull to learn that kind of stuff.
by Parsyval 9y ago
Since I work with Typescript, I do the same with the TS playground, it's really usefull to learn that kind of stuff.
- drinchev 9y agoI 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%20Dog%20%7B%0D%0A%20%20%20%20bark()%20%7B%0D%0A%20%20%20%20%20%20%20%20console.log(%22bark%22)%3B%0D%0A%20%20%20%20%7D%0D%0A%20%20%20%20static%20eat()%20%7B%0D%0A%20%20%20%20%20%20%20%20console.log(%22boo%22)%3B%0D%0A%20%20%20%20%7D%20%20%20%0D%0A%7D%0D%0A%0D%0A%0D%0A%0D%0A https://www.typescriptlang.org/play/index.html#src=class%20D...