From 280d2420c961468dd2b953d8c89a18ace09c9b3f Mon Sep 17 00:00:00 2001 From: Sam Goldman Date: Tue, 16 Oct 2018 22:43:10 -0700 Subject: [PATCH] Add return type annotation to addEmojiInput Summary: Flow does not infer generics, so generic functions should have annotated return types. This will become an error in the next Flow version. Note that this uncovered a bunch of errors, which I mostly fixed. I suppressed a few that would require code changes. Reviewed By: nmote Differential Revision: D10419507 fbshipit-source-id: 84b8f33f3c8fe272b18e35e838a0ebf7bdbaa6ff --- src/component/base/DraftEditorProps.js | 1 + src/model/constants/DraftHandleValue.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/component/base/DraftEditorProps.js b/src/component/base/DraftEditorProps.js index 416146ff42..202ffd53a0 100644 --- a/src/component/base/DraftEditorProps.js +++ b/src/component/base/DraftEditorProps.js @@ -47,6 +47,7 @@ export type DraftEditorProps = { // styling and formatting when re-applying styles. editorKey?: string, + // $FlowFixMe in practice people pass other renderable things here placeholder?: string, // Specify whether text alignment should be forced in a direction diff --git a/src/model/constants/DraftHandleValue.js b/src/model/constants/DraftHandleValue.js index 595e3bb504..1fe77547a1 100644 --- a/src/model/constants/DraftHandleValue.js +++ b/src/model/constants/DraftHandleValue.js @@ -19,4 +19,4 @@ * A type that allows us to avoid returning boolean values * to indicate whether an event was handled or not. */ -export type DraftHandleValue = 'handled' | 'not-handled'; +export type DraftHandleValue = 'handled' | 'not-handled' | boolean;