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

Flow and optional type support #19

Open
kristianmandrup opened this issue Mar 5, 2017 · 1 comment
Open

Flow and optional type support #19

kristianmandrup opened this issue Mar 5, 2017 · 1 comment

Comments

@kristianmandrup
Copy link

kristianmandrup commented Mar 5, 2017

Thought it would be cool if comments were passed through for documentation and usage such as enabling Flow type annotations, perhaps as an extension or plugin. Well, ideally I'd suggest support via a version line keyword flow. Could version keyword be enabled via extension!?

Flow/TS style arguments with default values and (optional) entry/exit types

const fn = ({ name = 'John Doe', age? : number }: Data): Data => ({
  name,
  age,
});

fn: ({name: 'John Doe', age}) -> ... could become fn: ({name: 'John Doe', age? <number> }) <Data> ->

We could start with limited flow support for function args and variable declarations

flow basics

c: "hello" <string>

What do you think?

@zhanzhenzhen
Copy link
Owner

Supporting types is a long term plan. That may be after WebAssembly specification is more complete, so that we can directly compile FutureScript to WebAssembly.

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

2 participants