Skip to content

Wrong typescript signature for OnChange #92

@caiorcferreira

Description

@caiorcferreira

Currently the onChange on react-codemirror is:

onChange?: (instance: CodeMirror.Editor, change: CodeMirror.EditorChangeLinkedList[]) => void;

However, when logging the parameter change I get:

"{"from":{"line":1,"ch":12,"sticky":null,"xRel":1,"outside":1},"to":{"line":1,"ch":12,"sticky":null,"xRel":1,"outside":1},"text":["a"],"removed":[""],"origin":"+input"} 

Which make sense since it its a linked list. The type for the parameter change should simply be CodeMirror.EditorChangeLinkedList.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions