We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af9c758 commit cf62e72Copy full SHA for cf62e72
1 file changed
src/components/editor/extensions/TableOfContents.tsx
@@ -1,4 +1,4 @@
1
-import { Node, mergeAttributes } from '@tiptap/core';
+import { Node as ProseMirrorNode, mergeAttributes } from '@tiptap/core';
2
import { ReactNodeViewRenderer } from '@tiptap/react';
3
import { NodeViewWrapper } from '@tiptap/react';
4
import type { Editor } from '@tiptap/react';
@@ -56,8 +56,7 @@ const TableOfContentsComponent = ({
56
(index: number) => {
57
let currentIndex = 0;
58
59
- editor.state.doc.descendants((node: any, pos: number) => {
60
- // eslint-disable-line @typescript-eslint/no-explicit-any
+ editor.state.doc.descendants((node: ProseMirrorNode, pos: number) => {
61
if (node.type.name === 'heading') {
62
if (currentIndex === index) {
63
editor.commands.focus();
0 commit comments