Skip to content
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

flow - allow type parameter defaults in function declarations #10084

Conversation

Projects
None yet
4 participants
@tanhauhau
Copy link
Member

commented Jun 11, 2019

Q                       A
Fixed Issues? Fixes #10083
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature? 👍
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT
@tanhauhau

This comment has been minimized.

Copy link
Member Author

commented Jun 11, 2019

@babel-bot

This comment has been minimized.

Copy link
Collaborator

commented Jun 11, 2019

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10950/

@tanhauhau tanhauhau force-pushed the tanhauhau:tanlh/feat/allow-type-parameter-default-for-function-declaration branch from b627142 to ba1b9f7 Jun 12, 2019

tanhauhau added some commits Jun 12, 2019

@tanhauhau tanhauhau force-pushed the tanhauhau:tanlh/feat/allow-type-parameter-default-for-function-declaration branch from 14d4e00 to 445cd2a Jun 13, 2019

@tanhauhau tanhauhau referenced this pull request Jun 13, 2019

Merged

BigInt type for Flow #10091

@nicolo-ribaudo
Copy link
Member

left a comment

The parameter doesn't seem to be used anymore:

allowDefault?: boolean = true,

Can we remove it?

(class A {
foo<T = string>() {}
});
declare function foo<T = string>() {}

This comment has been minimized.

Copy link
@existentialism

existentialism Jun 14, 2019

Member

Since we're in here shuffling things, can we give these tests better names so we don't have to go through this renumbering?

This comment has been minimized.

Copy link
@tanhauhau

tanhauhau Jun 14, 2019

Author Member

i wonder how i should name it, i copied the test case from flow fixtures, should i renamed it based on their test id?

This comment has been minimized.

Copy link
@existentialism

existentialism Jun 14, 2019

Member

Maybe:

default-invalid-declare-func
default-invalid-var-type
default-invalid-class-extends

🤷‍♂

@existentialism
Copy link
Member

left a comment

Just one nit/todo (not really blocking), otherwise LGTM

@nicolo-ribaudo nicolo-ribaudo merged commit fdbbb74 into babel:master Jun 15, 2019

5 checks passed

babel/repl REPL preview is available
Details
buildsize No significant change
Details
ci/circleci Your tests passed on CircleCI!
Details
codecov/project 87.46% (target 80%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.