From bd40cfc00573cccdfb95e58866db4147e2e04fa1 Mon Sep 17 00:00:00 2001 From: Munif Tanjim Date: Thu, 27 Jun 2019 00:09:07 +0600 Subject: [PATCH] @types/draft-js fix mixed immutable version problem (#36402) * @types/draft-js fix mixed immutable version problem * bump typescript version for draft dependents --- types/braft-editor/index.d.ts | 3 ++- types/draft-convert/index.d.ts | 3 ++- types/draft-js/index.d.ts | 2 +- types/draft-js/package.json | 2 +- types/react-draft-wysiwyg/index.d.ts | 10 ++++++++-- types/react-rte/index.d.ts | 3 ++- 6 files changed, 16 insertions(+), 7 deletions(-) diff --git a/types/braft-editor/index.d.ts b/types/braft-editor/index.d.ts index 0edeb34b2c..442b07acb7 100644 --- a/types/braft-editor/index.d.ts +++ b/types/braft-editor/index.d.ts @@ -1,8 +1,9 @@ // Type definitions for braft-editor 1.9 // Project: https://github.com/margox/braft#readme // Definitions by: Jonny Yao +// Munif Tanjim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 2.9 import * as React from "react"; import { RawDraftContentState } from 'draft-js'; diff --git a/types/draft-convert/index.d.ts b/types/draft-convert/index.d.ts index e27c8d84a8..4a46798d53 100644 --- a/types/draft-convert/index.d.ts +++ b/types/draft-convert/index.d.ts @@ -1,8 +1,9 @@ // Type definitions for draft-convert v2.1.5 // Project: https://github.com/HubSpot/draft-convert // Definitions by: Agustin Valeriani +// Munif Tanjim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 2.9 // Based on: https://github.com/HubSpot/draft-convert/issues/107#issuecomment-488581709 by declare module 'draft-convert' { diff --git a/types/draft-js/index.d.ts b/types/draft-js/index.d.ts index 23985cc6c1..311dd3a122 100644 --- a/types/draft-js/index.d.ts +++ b/types/draft-js/index.d.ts @@ -13,7 +13,7 @@ // Kevin Hawkinson // Munif Tanjim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 2.9 import * as React from 'react'; import * as Immutable from 'immutable'; diff --git a/types/draft-js/package.json b/types/draft-js/package.json index d657a0de12..a93761521d 100644 --- a/types/draft-js/package.json +++ b/types/draft-js/package.json @@ -1,6 +1,6 @@ { "private": true, "dependencies": { - "immutable": "^3.8.1" + "immutable": "~3.7.4" } } diff --git a/types/react-draft-wysiwyg/index.d.ts b/types/react-draft-wysiwyg/index.d.ts index 46fab16511..96a1f4ff01 100644 --- a/types/react-draft-wysiwyg/index.d.ts +++ b/types/react-draft-wysiwyg/index.d.ts @@ -3,8 +3,9 @@ // Definitions by: imechZhangLY // brunoMaurice // ldanet +// Munif Tanjim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 2.9 import * as React from 'react'; import * as Draft from 'draft-js'; @@ -67,7 +68,12 @@ export interface EditorProps { wrapperId?: number; customDecorators?: object[]; editorRef?(ref: object): void; - handlePastedText?(text: string, html: string, editorState: EditorState, onChange: (editorState: EditorState) => void): boolean; + handlePastedText?( + text: string, + html: string, + editorState: EditorState, + onChange: (editorState: EditorState) => void + ): boolean; } export class Editor extends React.Component { diff --git a/types/react-rte/index.d.ts b/types/react-rte/index.d.ts index c4e4a2bad8..1922a2e4be 100644 --- a/types/react-rte/index.d.ts +++ b/types/react-rte/index.d.ts @@ -1,8 +1,9 @@ // Type definitions for react-rte 0.16 // Project: https://github.com/sstur/react-rte // Definitions by: jclyons52 +// Munif Tanjim // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.8 +// TypeScript Version: 2.9 import { Component, ReactNode } from "react"; import { ContentBlock, EditorState } from "draft-js";