4 ms·
The problem is, Microsoft can't really do this. If they hired the creator of Babel, then proceeded to add TypeScript parsing support to it, they would immediate
by spion 10y ago
The problem is, Microsoft can't really do this. If they hired the creator of Babel, then proceeded to add TypeScript parsing support to it, they would immediately be accused of trying to "embrace, extend, extinguish".
On second thought, that might not be such a bad idea. Babel already parses some type annotations, why not also add the little extra syntax supported by TypeScript?
- qwertyuiop924 10y agoBabel has a plugin architecture. MS could implement the TS extensions as a Babel plugin, and it would integrate with any other Babel plugin. That's what facebook did.
- spion 10y agoYeah, it might be a good idea. A parser plugin to parse valid typescript, and a strip-types stage that strips them out.
- qwertyuiop924 10y ago...And that's what Flow does.