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

Generate d.ts declarations #308

Merged
merged 4 commits into from
Aug 1, 2016
Merged

Generate d.ts declarations #308

merged 4 commits into from
Aug 1, 2016

Conversation

alfonsogarciacaro
Copy link
Member

@alfonsogarciacaro alfonsogarciacaro commented Jul 31, 2016

This PR extends Fable AST to make it easier to add Flow type annotations when transforming it into Babel AST. These annotations can then be used by the babel-dts-generator plugin to generate d.ts declarations.

The declarations are far from perfect. These are some of the things missing:

  • Generic arguments: everything is already laid down to add them, we only need to fill in the gaps.
  • Class properties: a bit more of work, as class properties have to be added explicitly at least for unions and records.
  • Interfaces: it also requires some work as Fable is ignoring abstract methods at the moment.
  • Nested modules: I can foresee some pain here.

I'll try to implement at least the first two points before merging, but probably the other two will be postponed to another release.

@alfonsogarciacaro alfonsogarciacaro changed the title [WIP] Generate d.ts declarations Generate d.ts declarations Aug 1, 2016
@alfonsogarciacaro alfonsogarciacaro merged commit 8591abb into master Aug 1, 2016
@alfonsogarciacaro alfonsogarciacaro deleted the type-annotations branch September 9, 2016 15:46
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.

1 participant