Skip to content

Commit 6c091fe

Browse files
author
邓亮
committed
refactor(CodeBlock): 使用 CommandProps 类型替换 any 类型
1 parent ec35900 commit 6c091fe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/extensions/CodeBlock/CodeBlock.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { CodeBlockLowlight } from '@tiptap/extension-code-block-lowlight';
44
import { common, createLowlight } from 'lowlight';
55
import { ReactNodeViewRenderer } from '@tiptap/react';
6-
import { textblockTypeInputRule } from '@tiptap/core';
6+
import { CommandProps, textblockTypeInputRule } from '@tiptap/core';
77

88
import CodeBlockComponent from './CodeBlockComponent';
99

@@ -49,7 +49,7 @@ export const CodeBlock = CodeBlockLowlight.extend<CodeBlockOptions>({
4949
...this.parent?.(),
5050
createCodeBlock:
5151
() =>
52-
({ commands }: any) => {
52+
({ commands }: CommandProps) => {
5353
return commands.insertContent({
5454
type: this.name,
5555
attrs: { language: 'javascript' },

0 commit comments

Comments
 (0)