Sam Goldman
b85d6c7e4a
Add support for Flow def-site variance syntax
...
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.
2016-03-06 14:44:09 -08:00
Amjad Masad
024cba6433
Merge pull request #3305 from jviereck/T7052
...
Fix: Arrow functions with trailing comma + return type are throwing an error when parsing
2016-02-05 13:50:57 -08:00
Jeff Morrison
acc946c09e
Add support for leading pipes in Flow type alias RHS syntax
2016-02-05 13:23:55 -05:00
Julian Viereck
a121d1b7b5
Fix and tests
2016-01-31 01:22:31 +01:00
Sam Goldman
a04948f70f
Add export interface Flow syntax support
...
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
2016-01-05 15:57:45 -08:00
Sam Goldman
bd5c1a5b1b
Add support for "declare interface" Flow syntax
...
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.
2016-01-04 11:50:12 -08:00
Sam Goldman
0980819346
Add support for "declare type" Flow syntax
...
See facebook/flow#1105
2016-01-04 11:42:43 -08:00
Sebastian McKenzie
326e157e5d
Merge pull request #3203 from samwgoldman/flow-mixins-6.x
...
Add support for mixins to Babel 6.x
2015-12-27 21:04:40 +00:00
Sam Goldman
137abcaf7a
Add support for mixins to Babel 6.x
2015-12-23 16:09:12 -05:00
Sam Goldman
f0fd729883
Add support for this type to Babel 6.x
2015-12-23 13:54:57 -05:00
Amjad Masad
8716fb6f3f
Test name, and remove todos
2015-12-04 00:12:37 -08:00
Amjad Masad
e3da84bcc3
Add support for null literal type
2015-12-03 23:58:25 -08:00
Aliaksei Shytkin
5e987cd46e
Make arrow functions to work with multiple args and flow return type (fixes T2422)
2015-11-23 15:20:16 +03:00
Sebastian McKenzie
779675610f
fix defaults on type annotated arrow function params - fixes #2493
2015-11-05 09:49:03 +00:00
Sebastian McKenzie
2b6f78df83
fix existential type param parsing
2015-11-03 20:04:55 +00:00
Sebastian McKenzie
4016bae694
add ExistentialTypeParam - fixes #2587
2015-11-03 13:48:03 +00:00
Sebastian McKenzie
ea40d0134f
rename NumberLiteral to NumericLiteral and RegexLiteral to RegExpLiteral
2015-11-03 01:19:35 +00:00
Sebastian McKenzie
c224a7a370
fix parser bug where arrow functions have a higher precedence than they should - fixes #2118
2015-10-30 22:50:53 +00:00
Sebastian McKenzie
b909a81ab7
6.0.0
...
I'm extremely stupid and didn't commit as I go. To anyone reading this
I'm extremely sorry. A lot of these changes are very broad and I plan on
releasing Babel 6.0.0 today live on stage at Ember Camp London so I'm
afraid I couldn't wait. If you're ever in London I'll buy you a beer
(or assorted beverage!) to make up for it, also I'll kiss your feet and
give you a back massage, maybe.
2015-10-29 17:51:24 +00:00
Sebastian McKenzie
9908dc6f50
update babylon tests
2015-10-05 16:40:43 +01:00
Sebastian McKenzie
ae85fc0251
rename features in babylon tests
2015-09-15 06:13:11 +01:00
Sebastian McKenzie
446b297465
unoverload Literal AST node
2015-09-01 04:49:16 +01:00
Sebastian McKenzie
d97240ae09
Merge remote-tracking branch 'origin/master' into development
...
Conflicts:
packages/babel/scripts/build-dist.sh
2015-08-27 11:12:00 -07:00
Cesar Andreu
60f4003345
Add failing flow ObjectTypeProperty test
2015-08-26 06:51:12 -04:00
Sebastian McKenzie
df021c7f23
add esprima tests and fix bugs picked up by it
2015-08-11 00:59:15 +01:00
Sebastian McKenzie
71bbffa797
fix handling of flow method shorthand - fixes #2169
2015-08-05 21:42:15 +01:00
Sebastian McKenzie
a0f9d5fbc8
add support for export types
2015-07-31 23:34:45 +01:00
Sebastian McKenzie
b1c3ed6d2d
fix linting error and add missing tests
2015-07-30 23:47:59 +01:00
Sebastian McKenzie
1d81dd995c
add support for boolean flow literals - fixes #2127
2015-07-30 23:44:36 +01:00
Sebastian McKenzie
e6e3a68a39
make flow transformer use internal state to track whether we're in a type or not - fixes #2083
2015-07-27 00:06:26 +01:00
Sebastian McKenzie
23aa7b002d
improve babylon test coverage and remove dead code
2015-07-25 19:54:19 +01:00
Sebastian McKenzie
e7fec51feb
remove range property from nodes, clean up babylon codebase
2015-07-25 07:07:22 +01:00
Sebastian McKenzie
bed14e9b42
add espree comment attachment tests and remove ranges test property from babylon tests
2015-07-25 06:07:51 +01:00
Sebastian McKenzie
006f3db76a
update babylon fixtures to use File as the root node rather than Program
2015-07-25 05:24:58 +01:00
Sebastian McKenzie
b088f8e6ef
switch babylon tests to fixtures
2015-07-25 05:19:32 +01:00