-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experimental forward compatible type-stripper #229
Comments
@fcrozatier the shape of the solution before stage 2/2.7 will likely change in many ways that guarantees you can’t have forward compatibility, in particular because TS is not a syntactic superset of JS (generics syntax, in particular). |
The transition to annotated JS (aJS) could be seamless as the proposal doesn't introduce syntax without a TS equivalent, as far as I understand. Here's how this tool could evolve to support the transition: [x] Stage 1+: a TS → JS stripper. Assists TS users in restricting themselves to the subset of TS syntaxes with an equivalent in annotated JS The broader picture is a clean commutative diagram: TS ———> JS
| |
| | id
↓ ↓
aJS———> JS |
What I’m saying is that a proposal, at stage 1, is just a problem statement, not a solution shape, so there’s nothing to implement yet. |
Also from what I’ve observed from the discussions here is that the proposal stopped progressing b/c of the fact that it doesn’t seem possible to come up with a forward compatible syntax. If a syntax is locked in it’d mean ts need to stop evolving or if it is left open ended, js would need to start implementing what ts has. |
Hi, I've created a type-stripper to make it possible to experiment with this proposal today. The goal is to ensure forward compatibility, so that when the proposal reaches Stage 4, a simple change in file extensions will be all that's needed.
It throws errors for unsupported syntaxes, including auto-accessors, but not for the
satisfies
keyword #228The text was updated successfully, but these errors were encountered: