Skip to content
This repository was archived by the owner on May 19, 2018. It is now read-only.
/ babylon Public archive

Flow opaque type aliases parsing#643

Merged
hzoo merged 2 commits intobabel:masterfrom
jbrown215:master
Jul 21, 2017
Merged

Flow opaque type aliases parsing#643
hzoo merged 2 commits intobabel:masterfrom
jbrown215:master

Conversation

@jbrown215
Copy link
Contributor

Q A
Bug fix? no
Breaking change? no
New feature? yes
Deprecations? no
Spec compliancy? yes
Tests added/pass? yes
Fixed tickets N/A
License MIT

Flow v0.49 added parser support for opaque type aliases. Recently, in this commit, Flow finalized the parser changes for opaque type aliases.

The syntax is:
(export?) opaque type alias <identifier>(: <super-type>?) = <impltype>
where export and the supertype are optional.

If we are in a declare, we do not parse the impltype. So the syntax in a declare is:

declare (export?) opaque type alias <identifier>(: <super-type>?)

@jbrown215
Copy link
Contributor Author

Thanks for the quick review!

I assume I'll need to put up a similar PR against 6.x?

@existentialism
Copy link
Member

@jbrown215 yeah, can backport to 6.x after this lands. may also want to add support for DeclareOpaqueType, OpaqueType, etc to babel-types and babel-generator after this lands too.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants