@types/draft-js fix mixed immutable version problem (#36402)

* @types/draft-js fix mixed immutable version problem

* bump typescript version for draft dependents
This commit is contained in:
Munif Tanjim 2019-06-27 00:09:07 +06:00 committed by Benjamin Lichtman
parent 1fce2f26d6
commit bd40cfc005
6 changed files with 16 additions and 7 deletions

View File

@ -1,8 +1,9 @@
// Type definitions for braft-editor 1.9
// Project: https://github.com/margox/braft#readme
// Definitions by: Jonny Yao <https://github.com/petitspois>
// Munif Tanjim <https://github.com/MunifTanjim>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
// TypeScript Version: 2.9
import * as React from "react";
import { RawDraftContentState } from 'draft-js';

View File

@ -1,8 +1,9 @@
// Type definitions for draft-convert v2.1.5
// Project: https://github.com/HubSpot/draft-convert
// Definitions by: Agustin Valeriani <https://github.com/avaleriani/>
// Munif Tanjim <https://github.com/MunifTanjim>
// 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 <https://github.com/sbusch>
declare module 'draft-convert' {

View File

@ -13,7 +13,7 @@
// Kevin Hawkinson <https://github.com/khawkinson>
// Munif Tanjim <https://github.com/MunifTanjim>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
// TypeScript Version: 2.9
import * as React from 'react';
import * as Immutable from 'immutable';

View File

@ -1,6 +1,6 @@
{
"private": true,
"dependencies": {
"immutable": "^3.8.1"
"immutable": "~3.7.4"
}
}

View File

@ -3,8 +3,9 @@
// Definitions by: imechZhangLY <https://github.com/imechZhangLY>
// brunoMaurice <https://github.com/brunoMaurice>
// ldanet <https://github.com/ldanet>
// Munif Tanjim <https://github.com/MunifTanjim>
// 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<EditorProps> {

View File

@ -1,8 +1,9 @@
// Type definitions for react-rte 0.16
// Project: https://github.com/sstur/react-rte
// Definitions by: jclyons52 <https://github.com/jclyons52>
// Munif Tanjim <https://github.com/MunifTanjim>
// 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";