Skip to content

Infer type for variable declarations and class properties #540

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

Merged
merged 3 commits into from
Sep 13, 2016

Conversation

arv
Copy link
Contributor

@arv arv commented Sep 10, 2016

This infers the type from Flow type annotations for variable
declarations and class properties.

This also moves the logic for setting the type for typedefs
to the same type inferrer.

arv added 3 commits September 13, 2016 11:55
This is in preparation for inferring types for const/let/var.
This infers the type from Flow type annotations for variable
declarations and class properties.

This also moves the logic for setting the `type` for typedefs
to the same type inferrer.
Infer the type for statements like:

```js
const x = 42;
```

same as:

```js
const x: number = 42;
```
@arv arv force-pushed the infer-member-type branch from a8c35c7 to 906f69d Compare September 13, 2016 18:58
@arv
Copy link
Contributor Author

arv commented Sep 13, 2016

@tmcw Care to take a look?

@arv arv merged commit 2eff668 into documentationjs:master Sep 13, 2016
@arv arv deleted the infer-member-type branch September 13, 2016 19:40
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

Successfully merging this pull request may close these issues.

2 participants