Skip to content

Proposal: TypeScript should be built on the solid foundation of JS #2568

@joshgoebel

Description

@joshgoebel

Since TypeScript is purely a superset of Javascript (and all valid JS is also valid TS) and that we should merge our JS and TS grammars into a single grammar for ease of maintenance - this probably should have been done from the beginning, but water under the bridge. Right now many things require double the effort and there are strange differences between the grammars (like JS supports JSX but TS does not support TSX).

It also makes things harder for contributors... they need to do more work (perhaps double) be more aware of the bigger picture, etc...

Most recent example: #2562

We could literally make js and javascript as an alias of TypeScript or JS could be more of a "dummy" grammar that really just re-uses the TypeScript grammar under the hood. I'm not sure what the value there is though other than that lang.name would be "Javascript".

@egor-rogov Any objections?

Metadata

Metadata

Assignees

Labels

discuss/proposeProposal for a new feature/directionenhancementAn enhancement or new featurehelp welcomeCould use help from communitylanguage

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions