flow - allow type parameter defaults in function declarations#10084
Conversation
tanhauhau
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 |
|
fyi @samwgoldman |
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/10950/ |
b627142 to
ba1b9f7
Compare
14d4e00 to
445cd2a
Compare
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
The parameter doesn't seem to be used anymore:
Can we remove it?
| (class A { | ||
| foo<T = string>() {} | ||
| }); | ||
| declare function foo<T = string>() {} |
There was a problem hiding this comment.
Since we're in here shuffling things, can we give these tests better names so we don't have to go through this renumbering?
There was a problem hiding this comment.
i wonder how i should name it, i copied the test case from flow fixtures, should i renamed it based on their test id?
There was a problem hiding this comment.
Maybe:
default-invalid-declare-func
default-invalid-var-type
default-invalid-class-extends
🤷♂
existentialism
left a comment
There was a problem hiding this comment.
Just one nit/todo (not really blocking), otherwise LGTM