-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Comments
Agreed. Not only does it appear that you can specify any custom entity type you want, it seems like this is what you're supposed to do, that it is the primary identifier of what your entity is. The Draft JS Plugins project uses custom ones (e.g. sticker, emoji). |
I came to the same conclusion. Typing is "broken" but implementation works as intended when I use custom type. I have a So I think it is a doc & typing issue. |
Same issue here, I have to add |
yep. This flowtype is wrong imo, will bring this up 👍 |
Thanks for raising this! Loosening the Flow type here seems reasonable to me, so going to merge @juliankrispel's PR :) |
This change is mentioned in the release notes for 0.10.5 but it seems like it did not make it into the release. |
Summary: **Summary** - Updated the DraftEntity flow type to be `string`. fixes facebookarchive#868 **Test Plan** N/A Pull Request resolved: facebookarchive#1878 Differential Revision: D10188002 fbshipit-source-id: e52da4d8dd708c7ed58e7d6f8c585e86835f1bb2
From the doc that introduces Entities, it said
But in the source code, the type of an Entity is limited to
LINK
,TOKEN
,PHOTO
orIMAGE
, as seen insrc/stubs/ComposedEntityType.js
.So my questions:
VIDEO
, break Flow's type checking?PHOTO
andIMAGE
? I didn't find any explanations on that.The text was updated successfully, but these errors were encountered: