3 ms·
Maybe official preprocessor plugins for TypeScript compiler could help? I understand that everybody who needs it can already put their own preprocessor that ge
by scotty79 3y ago
Maybe official preprocessor plugins for TypeScript compiler could help?
I understand that everybody who needs it can already put their own preprocessor that generates runtime objects from type information before the code is passed to tsc for compilation.
But the effort is inconsistent and distributed.
If TypeScript officially supported pluggable preprocessor and plugin ecosystem for it some good solutions might get discovered.
- andix 3y agoWhat's next? An official TypeScript UI framework, will it be Vue, React, Next.js or Svelte? An official TypeScript date library?
- scotty79 3y agoWhat's the point of any of those? Generating code based on type annotations is frequently requested feature directly related to the core feature of TypeScript which is type system.
- clansimus 3y agoI'll take an official WYSIWYG editor while we're at it
- pjmlp 3y agoThis is the curse of guest languages, after the initial adoption pain everyone wants idiomatic libraries and pretends the underlying platform doesn't exist. Until they hit a roadblock caused by a leaky abstraction, that proves them otherwise.
- andix 3y agoType script does a very good job not to hide the underlying platform. In it's essence it is just a development time linter and does not interfere with the JavaScript runtime at all (except enums). And I think that's actually the reason why it won the competition against Googles Dart. They even used Microsofts TypeScript for Angular instead of their own language Dart.
- pjmlp 3y agoIndeed, and that is why the Typescript team is against any feature that steps away from that relationship.