Allow typing of RawDraftEntity (#35208)

It's helpful, when working with `RawDraftEntity`, to have a typed `data` property, whilst it still defaults to `{ [key: string]: any }`
This commit is contained in:
Dimitar Nikovski 2019-05-13 23:02:27 +01:00 committed by Nathan Shively-Sanders
parent 353eb17ad6
commit 12c5676b0f

View File

@ -505,10 +505,10 @@ declare namespace Draft {
/**
* A plain object representation of an EntityInstance.
*/
interface RawDraftEntity {
interface RawDraftEntity<T = { [key: string]: any }> {
type: DraftEntityType;
mutability: DraftEntityMutability;
data: { [key: string]: any };
data: T;
}
/**