Skip to content

Commit

Permalink
upgrade typescript and fix destroy of old timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed May 8, 2024
1 parent 827b2c7 commit 3c8a23b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"prosemirror-view": "^1.26.2",
"rollup": "^2.59.0",
"standard": "^17.0.0",
"typescript": "^4.8.4",
"typescript": "^5.4.5",
"y-protocols": "^1.0.5",
"y-webrtc": "^10.2.0",
"yjs": "^13.5.38"
Expand Down
5 changes: 0 additions & 5 deletions src/plugins/sync-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export const ySyncPlugin = (yXmlFragment, {
permanentUserData = null,
onFirstRender = () => {}
} = {}) => {
let rerenderTimeout
let initialContentChanged = false
const plugin = new Plugin({
props: {
Expand Down Expand Up @@ -173,9 +172,6 @@ export const ySyncPlugin = (yXmlFragment, {
},
view: (view) => {
const binding = new ProsemirrorBinding(yXmlFragment, view)
if (rerenderTimeout != null) {
rerenderTimeout.destroy()
}
binding._forceRerender()
onFirstRender()
return {
Expand Down Expand Up @@ -217,7 +213,6 @@ export const ySyncPlugin = (yXmlFragment, {
}
},
destroy: () => {
rerenderTimeout.destroy()
binding.destroy()
}
}
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
},
"include": ["./src/**/*"],
"exclude": ["../lib0/**/*", "node_modules/**/*", "dist", "dist/**/*.js"]
"include": ["src"],
"exclude": ["node_modules", "dist"]
}

0 comments on commit 3c8a23b

Please sign in to comment.