Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong typescript signature for OnChange #92

Closed
caiorcferreira opened this issue Feb 19, 2021 · 1 comment · Fixed by #111
Closed

Wrong typescript signature for OnChange #92

caiorcferreira opened this issue Feb 19, 2021 · 1 comment · Fixed by #111

Comments

@caiorcferreira
Copy link

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.

@jaywcjlove
Copy link
Member

@caiorcferreira Upgrade + @uiw/[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants