From f8478e7d72b0d9a9566ddb7ebb94fe0e32955d02 Mon Sep 17 00:00:00 2001 From: Pavel_Evsegneev Date: Thu, 10 Mar 2016 17:28:38 +0200 Subject: [PATCH] Update draft.js definitions to 0.2.2 --- draft-js/draft-js.d.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/draft-js/draft-js.d.ts b/draft-js/draft-js.d.ts index 8135a260c..6fa780f86 100644 --- a/draft-js/draft-js.d.ts +++ b/draft-js/draft-js.d.ts @@ -1,4 +1,4 @@ -// Type definitions for draft-js 0.1.0 +// Type definitions for draft-js 0.2.2 // Project: https://github.com/facebook/draft-js // Definitions by: Pavel Evsegneev // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -144,7 +144,8 @@ declare module "draft-js" { interface BlockMap { get(key: string): ContentBlock, set(key: string, value: any): BlockMap, - delete(key: string): BlockMap + delete(key: string): BlockMap, + find(cb: any): ContentBlock } interface Modifier { @@ -232,7 +233,10 @@ declare module "draft-js" { onUpArrow?: (e: any) => void, onDownArrow?: (e: any) => void, - suppressContentEditableWarning?: any + suppressContentEditableWarning?: any, + + onBlur?: (e: any) => void, + onFocus?: (e: any) => void } interface Editor { @@ -262,7 +266,9 @@ declare module "draft-js" { var RichUtils: RichUtils; function convertFromRaw(rawState: any): Array; + function convertToRaw(contentState: ContentState): any; + function genKey(): string }