This repository was archived by the owner on Feb 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
ContentBlock. Cannot implement #1621
Comments
Temp fix (it contains another temp fix) in .flowconfig
|
Getting the same thing, using flow 0.64.0. |
Will look into this. cc @flarnie |
The tricky part about this one is that the error isn't present in the draft-js source tree, it only manifests in the distribution version due to the babel transform used by the gulp flow task. The interface declaration for BlockNode.js looks like this: export interface BlockNode {
findEntityRanges(
filterFn: (value: CharacterMetadata) => boolean,
callback: (start: number, end: number) => void,
): void,
/* ...rest of implementation elided */
} The flow transform will output this: export interface BlockNode {
findEntityRanges: (
filterFn: (value: CharacterMetadata) => boolean,
callback: (start: number, end: number) => void,
) => void,
/* ...rest of implementation elided */
} There are basically three options to fix this:
For 2 or 3 the output would look like this: export interface BlockNode {
+findEntityRanges: (
filterFn: (value: CharacterMetadata) => boolean,
callback: (start: number, end: number) => void,
) => void,
/* ...rest of implementation elided */
} |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
v0.10.5
Monitor logs will go to /private/tmp/flow/zSUserszSsteidazSdevzSeste.monitor_log
Error: node_modules/draft-js/lib/ContentBlock.js.flow:54
54: class ContentBlock extends ContentBlockRecord implements BlockNode {
^^^^^^^^^^^^ ContentBlock. Cannot implement
54: class ContentBlock extends ContentBlockRecord implements BlockNode {
^^^^^^^^^ BlockNode
Property
findEntityRanges
is incompatible:54: class ContentBlock extends ContentBlockRecord implements BlockNode {
^^^^^^^^^^^^ ContentBlock. Covariant property
findEntityRanges
incompatible with invariant use in54: class ContentBlock extends ContentBlockRecord implements BlockNode {
^^^^^^^^^ BlockNode
Error: node_modules/draft-js/lib/ContentBlock.js.flow:54
54: class ContentBlock extends ContentBlockRecord implements BlockNode {
^^^^^^^^^^^^ ContentBlock. Cannot implement
54: class ContentBlock extends ContentBlockRecord implements BlockNode {
^^^^^^^^^ BlockNode
Property
findStyleRanges
is incompatible:54: class ContentBlock extends ContentBlockRecord implements BlockNode {
^^^^^^^^^^^^ ContentBlock. Covariant property
findStyleRanges
incompatible with invariant use in54: class ContentBlock extends ContentBlockRecord implements BlockNode {
^^^^^^^^^ BlockNode
Error: node_modules/draft-js/lib/ContentBlock.js.flow:54
54: class ContentBlock extends ContentBlockRecord implements BlockNode {
^^^^^^^^^^^^ ContentBlock. Cannot implement
54: class ContentBlock extends ContentBlockRecord implements BlockNode {
^^^^^^^^^ BlockNode
Property
getCharacterList
is incompatible:54: class ContentBlock extends ContentBlockRecord implements BlockNode {
^^^^^^^^^^^^ ContentBlock. Covariant property
getCharacterList
incompatible with invariant use in54: class ContentBlock extends ContentBlockRecord implements BlockNode {
^^^^^^^^^ BlockNode
Error: node_modules/draft-js/lib/ContentBlock.js.flow:54
54: class ContentBlock extends ContentBlockRecord implements BlockNode {
^^^^^^^^^^^^ ContentBlock. Cannot implement
The text was updated successfully, but these errors were encountered: