* generate typescript types
* improve type generator output
* move generator scripts to scripts/generators
* use new stringifier for generating flow types too
* export summary types
* add support for oneOfNodeOrValueTypes to improve type generation
* export typescript types from top level, and remove module declaration
* generate typescript/flow types and copy typescript types to babel-types/lib as part of make build
* copy flow types to babel-types/lib as part of make build (fix#6839)
* improve typing: Identifier->name should be a string, not any
* avoid destructuring, to support node 4
* update doc generator to share more code, regenerate babel-types readme, pipe all generator output to stdout
* regenerate babel-types readme as part of make build
* improve typing: ClassProperty->key should be Identifier | StringLiteral | NumericLiteral | Expression, not any
* improve typing: optional node properties are nullable, not undefinedable
* improve docs: FlowClassImplements should be ClassImplements
* make ts usage more friendly: when using babel-types api, make optional params | undefined, and when reading nodes keep optional params | null
* rm lib/types.d.ts and lib/types.js in favor of packages/babel-types/lib
* add missing variance node type, address review comments
* add tests for flow variance
* Comment should be a disjoint union of tagged types
* update .flowconfig
* babel-generator: Add TypeScript support
* Remove type declarations; not published from babylon
* Remove TODOs
* Consistently use `this.word` for tokens that are words
* Remove whitespace generation and rely on default printing
Changes to printing:
* Add newline after last empty SwitchCase
* Add newlines around block comments if they are non-flow comments or contain newlines
* Fix a few more fixtures
* Add variance node type and generate property variance annotations
babel/babylon#161 adds parsing support for property variance
annotations. This PR adds the necessary node type for the new Variance
node and generate support for all the positions where variance can now
appear.
* Variance is no longer a separate node type
This diff also adds tests to class properties and to the
flow-strip-types transform.
* Add test + fix for edge case with variance and class proeprties
This fixes an issue where optional properties would get transformed to
an invalid syntax. The easiest solution was to make all FunctionTypes
get transformed to the arrow syntax (previously everything went the
other way).
This has been a feature in Flow for a long time (couldn't easily find a
specific commit adding this). Interfaces are basically undocumented, though, so
it's easy to see how this was missed.