From 589220d3ccf41cdbe88864949e4b0a89de4218ed Mon Sep 17 00:00:00 2001 From: Michael Wu Date: Wed, 12 Jul 2017 13:30:26 -0400 Subject: [PATCH] Extend React.Component correctly in draft-js The generic type Component requires two arguments. --- types/draft-js/index.d.ts | 5 +++-- types/draft-js/package.json | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index f7f389ea33..ff52f8932e 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -4,6 +4,7 @@ // Eelco Lempsink // Yale Cason // Ryan Schwers +// Michael Wu // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -37,7 +38,7 @@ declare namespace Draft { * div, and provides a wide variety of useful function props for managing the * state of the editor. See `DraftEditorProps` for details. */ - class DraftEditor extends React.Component { + class DraftEditor extends React.Component { // Force focus back onto the editor node. focus(): void; // Remove focus from the editor node. @@ -162,7 +163,7 @@ declare namespace Draft { } namespace Components { - class DraftEditorBlock extends React.Component { + class DraftEditorBlock extends React.Component { } } diff --git a/types/draft-js/package.json b/types/draft-js/package.json index 84d23a146b..617790d310 100644 --- a/types/draft-js/package.json +++ b/types/draft-js/package.json @@ -1,5 +1,5 @@ { "dependencies": { - "immutable": "^3.8.1" + "immutable": "^3.8.1" } -} \ No newline at end of file +}