* fix: typo
* declare name for flow interface
* add test case for export overload function, typescript
* test: add test
Fixes#10044
* test: update test
* test(flow): add multiple declarations regression test
* re-enable flow test case
# Conflicts:
# packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/def-site-variance/input.js
# packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-declare-statements/input.js
# packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-interfaces-module-and-script/input.js
# packages/babel-plugin-transform-flow-strip-types/test/fixtures/strip-types/strip-iterator/input.js
* test: disable two flow dupl-decl test
* fix: do not declare name for declare function until we figure out a better way
* test: duplicate declare function and function would not throw
* Fix issues in flow-comments to preserve comments and there order (fixes#10324)
* Add support in flow-comments for extends in class declarations (fixes#10323, #10321)
* Refactoring and cleanup of flow-comments plugin
* Fix comments preservation logic of flow-comments
* Fix flow-comments where comments are class identifier and extends keyword
* Introduce scope tracking
* Fix tests
* Add new tests
* Remove constructor-super check from transform as it is now in parser
* Correctly handle class properties and class scope
* Fix duplicate name check
* Convert scope identifier storage to array
* Enter a new scope in typescript module blocks
* Add test for duplicate declaration
* Rename error for duplicate exports
* Treat class declarations as lexical declaration
* Update whitelist
* Add tests
* Fix scope tracking for function declarations
* Migrate try-catch duplicate error
* Fix test
* More tests
* One more test
* Make scope a separate class and fix review comments
* Do not allow new.target in top scope arrow function
* Correctly enter new scope for declare module and treat type aliases as lexical declarations
* Tests for typescript scope tracking to not mark type aliases as duplicate
* Fix flow scope tracking
* Remove ident from test names as redundant
* Add test case for var and function
* Improve error messages
* Improve literal regex
* #7349
- Add "use strict" directive to transformed class bodies
* Update tests (#7349)
* Add test for program with use strict directive (#7349)
* Update tests (#7349)
* Update source mapping (#7349)
* Add test for parent blockStatement with use strict directive (#7349)
* Update tests (#7349)
* Update tests (#7349)
* Update tests (#7349)
* Add test for constructor-only class (#7349)
* Constructor only classes are strict, too
But constructor only that use non-simple parameters must use a strict function wrapper.
* Fix test
* Wrapper not needed if class is already strict
* Revert change to lerna.json
* add transform-class-properties to stage 3, set spec mode to default
* update readme with examples; use `buildUndefinedNode()`; change behavior to always define both static and nonstatic class properties regardless of spec/loose mode; update tests
* 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
This syntax allows you to specify whether a type variable can appear in
a covariant or contravariant position, and is super useful for, say,
Promise.
Right now this is hacked in jankily, but in the next major release we
should stop using Identifier nodes for type parameters.
An interface export is just like a type export. In fact, it's a syntax affordance which makes the following equivalent:
```javascript
interface I_ { ... }
export type I = I_;
```
```javascript
export interface I { ... }
```
See facebook/flow#1145
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.