File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @tiptap/core " : major
3
+ ---
4
+
5
+ Fix ` getPos ` type in ` NodeViewRendererProps ` to potentially be ` undefined `
6
+
7
+ Breaking change: Types may flag uses of getPos where an ` undefined ` possibility isn't handled.
8
+ Why this change was made: To ensure the type reflects the real functionality of this function.
9
+ How to update: Ensure that the return value of ` getPos ` exists before making use of the value.
Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ export type NodeViewRendererProps = {
236
236
// pass-through from prosemirror
237
237
node : Parameters < NodeViewConstructor > [ 0 ] ;
238
238
view : Parameters < NodeViewConstructor > [ 1 ] ;
239
- getPos : ( ) => number ; // TODO getPos was incorrectly typed before, change to ` Parameters<NodeViewConstructor>[2];` in the next major version
239
+ getPos : Parameters < NodeViewConstructor > [ 2 ] ;
240
240
decorations : Parameters < NodeViewConstructor > [ 3 ] ;
241
241
innerDecorations : Parameters < NodeViewConstructor > [ 4 ] ;
242
242
// tiptap-specific
You can’t perform that action at this time.
0 commit comments