Thanks to visit codestin.com
Credit goes to github.com

Skip to content

reuse TS code templates for ES6/ES7 #169

@atsu85

Description

@atsu85

@EisenbergEffect, I noticed, that code templates are duplicated for both TypeScript and ES6/ES7 versions of the generated source code.

I'm wondering, if it is worth writing both TypeScript and ES6/ES7 versions of each class. Ideally ES6/ES7 should be generated from TypeScript. I guess You have considered it? Probably TypeScript compiler can't be used to only strip the type annotations (that might be what is desired here) so probably some other tool could be used instead? TypeScript compiler removes type annotations, but additionally:

  • replaces decorators with __decorate(...)
  • replaces class declarations with class expressions (that is more verbose and may be harder to grasp)

What are Your thoughts?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions