Skip to content
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

Would it make sense to align with TypeScript syntax? #64

Open
trusktr opened this issue Dec 27, 2021 · 3 comments
Open

Would it make sense to align with TypeScript syntax? #64

trusktr opened this issue Dec 27, 2021 · 3 comments

Comments

@trusktr
Copy link

trusktr commented Dec 27, 2021

Static types officially in JS would be awesome. It would allow things like AssemblyScript (TypeScript to WebAssembly) to be even more possible in a standard way, and for alternatives to exist and push boundaries forward.

I see some differences in the proposal compared to TS syntax, which is why I was curious. AssemblyScript already rides on TypeScript syntax.

Or are there benefits that this proposal's syntax has that make it a better choice than TypeScript syntax?

@jimmywarting
Copy link

TypeScript in itself is not a "Standard" language
it's just syntactic suger on top of a standard JavaScript syntax to add types.

i don't see any "compile-to-js" languages as a "standard"

@sirisian
Copy link
Owner

sirisian commented Jan 1, 2022

Based on feedback I incorporated unions - which might still have issues with parsing ambiguities. I also added the interface sections because they're important. If TS handles things better for features I'm all for changing things. Feel free to open issues for things TS does better.

(I don't use TS, and it's been a while since I've looked into the differences or made 1:1 comparisons. Working from small code examples would probably be ideal).

@CharlyJazz
Copy link

We should make this proposal more close to typescript in order to do not destroy the whole typescript ecosystem like DefinitelyTypes packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants