-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add declare type
and declare interface
Flow syntax support to 6.x
#3230
Merged
amasad
merged 2 commits into
babel:master
from
samwgoldman:declare-type-declare-interface
Jan 5, 2016
Merged
Add declare type
and declare interface
Flow syntax support to 6.x
#3230
amasad
merged 2 commits into
babel:master
from
samwgoldman:declare-type-declare-interface
Jan 5, 2016
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Current coverage is
|
👍 looks good |
Looks good! |
amasad
added a commit
that referenced
this pull request
Jan 5, 2016
Add `declare type` and `declare interface` Flow syntax support to 6.x
samwgoldman
added a commit
to samwgoldman/babel
that referenced
this pull request
Jan 6, 2016
Backport of babel#3230 to 5.x branch
facebook-github-bot
pushed a commit
to facebook/flow
that referenced
this pull request
Jul 11, 2017
Summary: adds a `DeclareInterface` ast node to distinguish interfaces with a `declare` modifier: ``` declare interface Foo {} // DeclareInterface interface Foo {} // InterfaceDeclaration ``` currently, both are parsed as `InterfaceDeclaration`s, and the locations of both only include the `interface Foo {}` part. the `declare` is orphaned. this is bad. we actually added this node to babel (babel/babel#3230) but didn't do the same for ourselves. Reviewed By: samwgoldman Differential Revision: D5394048 fbshipit-source-id: 43cc2f117ff2501ae16041da15848a1ceeea30a7
facebook-github-bot
pushed a commit
to facebook/flow
that referenced
this pull request
Jul 11, 2017
Summary: adds a `DeclareTypeAlias` ast node to distinguish type aliases with a `declare` modifier: ``` declare type x = number // DeclareTypeAlias type x = number // TypeAlias ``` currently, both are parsed as `TypeAlias`s, and the locations of both only include the `type x = number` part. the `declare` is orphaned. this is bad. we actually added this node to babel (babel/babel#3230) but didn't do the same for ourselves. Reviewed By: samwgoldman Differential Revision: D5395003 fbshipit-source-id: a4a84b2ce4384496a03434332fc46de5a0feebea
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If this looks good, I'll back port to 5.x