ProseMirror / prosemirror

The ProseMirror WYSIWYM editor
http://prosemirror.net/
MIT License
7.61k stars 336 forks source link

Property 'updateState' does not exist on type 'DirectEditorProps' #1354

Closed hdsuperman closed 1 year ago

hdsuperman commented 1 year ago

Version

"prosemirror-view": "^1.30.1", "react": "18.2.0", "typescript": "4.9.3"

dispatchTransaction(tr) {
  const newState = this.state.apply(tr);
  this.updateState(newState);   // TS2339: Property 'updateState' does not exist on type 'DirectEditorProps'.
  if (tr.docChanged) {
    onChangeRef.current(serializer(newState.doc));
  }
},
marijnh commented 1 year ago

Looks like you're expecting this to point at a different thing from what it actually points at. That's not an issue in the library though.