-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[Bug]: node_modules/@tiptap/core/dist/NodeView.d.ts:31:5 - error TS2416: Property 'ignoreMutation' in type 'NodeView<Component, NodeEditor, Options>' #5867
Comments
I think this is probably a change on the prosemirror side, but honestly you probably should not be type checking your lib files, with |
Yep changed here: ProseMirror/prosemirror-view@cebd804 |
I also faced this issue when integrating it into my angular repo. I could also reproduce it in a newly created angular repo on stackblitz https://stackblitz.com/edit/stackblitz-starters-3n6y2x?file=src%2Fmain.ts |
I fixed your sandbox with Really should not be type checking library code, not just for perf but minor incompatibilities like this. |
@nperez0111 I get you point. But it seems in angular repos for example this seem to be enabled by default. Can confirm that |
# Pull Request ## 🤨 Rationale Updates dependencies manually to address build issues revealed by #2482 #2481 #2480. Found that just updating dependencies by rebuilding the lock fails the build which means the [repo is in a bad state](#1479 (comment)) and that should be addressed quickly. ## 👩💻 Implementation - Update major deps and rebuild lock - Found that the now [deprecated tiptap link validate](https://tiptap.dev/docs/editor/extensions/marks/link#validate-deprecated) function is expected to still function with [backwards compat](ueberdosis/tiptap#5812) however there seems to be a regression as it [fails our build by allowing autolinking of unexpected protocols](https://github.com/ni/nimble/actions/runs/12110590706/job/33761233944#step:17:613). - Switched from tiptap link validate to [shouldAutoLink](https://tiptap.dev/docs/editor/extensions/marks/link#shouldautolink) as described by docs. That seems to not fail the build. - Pushed the min semver range version up for all the tiptap / prosemirror packages as otherwise it seems to[ fail build when type checking libraries](ueberdosis/tiptap#5867). **NOTE**: It seems to be transitive dependency type issues that will fail builds, I think it's possible that minimal upgrades done by renovate may hit issues in app updates. If an app adopting latest these changes fails to build it may need to rebuild the lock files in a clean workspace to align transitive deps on latest versions and avoid library type check issues. - Updates to [prettier 3.4](https://prettier.io/blog/2024/11/26/3.4.0.html) resulting in lots of changes. ## 🧪 Testing Rely on CI. ## ✅ Checklist - [x] I have updated the project documentation to reflect my changes or determined no changes are needed.
Affected Packages
tip tap core
Version(s)
2.10.2
Bug Description
When I build my application getting below error
node_modules/@tiptap/core/dist/NodeView.d.ts:31:5 - error TS2416: Property 'ignoreMutation' in type 'NodeView<Component, NodeEditor, Options>' is not assignable to the same property in base type 'NodeView'.
Type '(mutation: MutationRecord | { type: "selection"; target: Element; }) => boolean' is not assignable to type '(mutation: ViewMutationRecord) => boolean'.
Types of parameters 'mutation' and 'mutation' are incompatible.
Type 'ViewMutationRecord' is not assignable to type 'MutationRecord | { type: "selection"; target: Element; }'.
Type '{ type: "selection"; target: Node; }' is not assignable to type 'MutationRecord | { type: "selection"; target: Element; }'.
Type '{ type: "selection"; target: Node; }' is not assignable to type '{ type: "selection"; target: Element; }'.
Types of property 'target' are incompatible.
Type 'Node' is missing the following properties from type 'Element': attributes, classList, className, clientHeight, and 118 more.
31 ignoreMutation(mutation: MutationRecord | {
~~~~~~~~~~~~~~
Browser Used
Chrome
Code Example URL
No response
Expected Behavior
Build without fail..
Additional Context (Optional)
No response
Dependency Updates
The text was updated successfully, but these errors were encountered: