From 007889e18ba2f6169e54ec41ed808fe66e5605bc Mon Sep 17 00:00:00 2001 From: Nikita Balikhin Date: Fri, 3 Jan 2020 02:40:17 +0300 Subject: [PATCH] @types/draft-js fix customStyleFn return type (#41276) --- types/draft-js/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index 9bc4f07799..beb35f7b92 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -98,9 +98,9 @@ declare namespace Draft { // that will be rendered for matching ranges. customStyleMap?: DraftStyleMap; - // Provide a function that will construct CSS style objects given inline - // style names. - customStyleFn?: (style: DraftInlineStyle, block: ContentBlock) => DraftStyleMap; + // Define a function to transform inline styles to CSS objects + // that are applied to spans of text. + customStyleFn?: (style: DraftInlineStyle, block: ContentBlock) => React.CSSProperties; // A function that accepts a synthetic key event and returns // the matching DraftEditorCommand constant, or null if no command should