Re:JavaScript libraries should be written in TypeScript
by Mchl on Wednesday March 16, 2016 @12:32PM
(#11298592)
The one about classes is solved by not using classes. Prototypal inheritance works well (and besides, most implementations of 'class-like' behaviour are using prototypes underneath anyway)
I'm playing a bit of a devil's advocate here ;)
Re:JavaScript libraries should be written in TypeScript
by tlrobinson on Wednesday March 16, 2016 @12:40PM
(#11298643)
ES6 provides solutions for #1 and #2. These will replace the fragmented existing solutions.
I'm not sure I understand #3. Closures?
* a single, definitive method for creating namespaces without using a framework or library
* a single, definitive method for defining classes and using inheritance without using a framework or library
* a single, definitive method of allowing async functions to modify the state of an object without having to declare that object in the global scope, without using a framework or library
If these problems are already solved, please let me know!