FlowTypes are totally broken in 0.11.0-beta
Closed this issue · 7 comments
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When installing draft-js@0.11.0-beta
from NPM, the flow types are completely broken.
Flow Version: 0.92.0
As an example, in DraftEditor.flow.js:
Unexpected token ':'
This looks syntactically wrong. Am I missing something here?
What is the expected behavior?
The flow types should work
Whoa, thanks for bringing this up. I'll take a look now. Something must be broken in the build step that strips and extracts types.
This is broken in master too. It seems related to the way types for class properties are declared:
https://github.com/facebook/draft-js/blob/7b9a7e116ab6dd639ebba28736629dfc04cbc7b0/src/component/base/DraftEditor.react.js#L522
Boarding a plane now, will take a look once landed 😅
Okay I confirmed it's babel-plugin-syntax-flow that barfs when encountering types associated with class properties. I'll take a closer look.
I have a fix @abettadapur, would you like to review?
Hold on, there's still an issue with the 'check-dependencies'
build step
Fixed with #2028