Skip to content

Commit f4be000

Browse files
committed
refactor(RichTextEditor): remove ts-ignore and add tiptap-commands to ts-shim
1 parent 302fac1 commit f4be000

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

assets/js/tiptap/ListItem.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Node } from 'tiptap'
2-
// @ts-ignore
32
import {splitListItem, liftListItem, sinkListItem, insertText, chainCommands} from 'tiptap-commands'
43

54
export default class ListItem extends Node {
@@ -20,8 +19,7 @@ export default class ListItem extends Node {
2019
}
2120
}
2221

23-
// @ts-ignore
24-
keys({ type }) {
22+
keys({ type } : any) {
2523
return {
2624
Enter: splitListItem(type),
2725
Tab: chainCommands(sinkListItem(type), insertText(" ")),

ts-shim.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ declare module "*.vue" {
55

66
declare module 'tiptap';
77
declare module 'tiptap-extensions';
8+
declare module 'tiptap-commands';
89
declare module 'highlight.js/lib/highlight';
910
declare module 'highlight.js/lib/languages/javascript';
1011
declare module 'highlight.js/lib/languages/css';

0 commit comments

Comments
 (0)