From 12c5676b0fe0df5533e5d5adc927e9a1d5158d26 Mon Sep 17 00:00:00 2001 From: Dimitar Nikovski Date: Mon, 13 May 2019 23:02:27 +0100 Subject: [PATCH] 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 }` --- types/draft-js/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index 0f353b1775..dbc2b76f0b 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -505,10 +505,10 @@ declare namespace Draft { /** * A plain object representation of an EntityInstance. */ - interface RawDraftEntity { + interface RawDraftEntity { type: DraftEntityType; mutability: DraftEntityMutability; - data: { [key: string]: any }; + data: T; } /**