tiptap: fix type

This commit is contained in:
fantasticit 2022-06-05 01:00:18 +08:00
parent 196d27d568
commit 018305c1d0
3 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,4 @@
import { IUser } from '@think/domains';
import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core'; import { mergeAttributes, Node, wrappingInputRule } from '@tiptap/core';
import { ReactNodeViewRenderer } from '@tiptap/react'; import { ReactNodeViewRenderer } from '@tiptap/react';
import { DocumentReferenceWrapper } from 'tiptap/core/wrappers/document-reference'; import { DocumentReferenceWrapper } from 'tiptap/core/wrappers/document-reference';
@ -5,7 +6,7 @@ import { getDatasetAttribute } from 'tiptap/prose-utils';
export type IDocumentReferenceAttrs = { export type IDocumentReferenceAttrs = {
defaultShowPicker?: boolean; defaultShowPicker?: boolean;
createUser: string; createUser?: IUser['id'];
}; };
declare module '@tiptap/core' { declare module '@tiptap/core' {

View File

@ -1,3 +1,4 @@
import { IUser } from '@think/domains';
import { mergeAttributes, Node, nodeInputRule } from '@tiptap/core'; import { mergeAttributes, Node, nodeInputRule } from '@tiptap/core';
import { ReactNodeViewRenderer } from '@tiptap/react'; import { ReactNodeViewRenderer } from '@tiptap/react';
import { KatexWrapper } from 'tiptap/core/wrappers/katex'; import { KatexWrapper } from 'tiptap/core/wrappers/katex';
@ -5,7 +6,7 @@ import { KatexWrapper } from 'tiptap/core/wrappers/katex';
export type IKatexAttrs = { export type IKatexAttrs = {
text?: string; text?: string;
defaultShowPicker?: boolean; defaultShowPicker?: boolean;
createUser: string; createUser?: IUser['id'];
}; };
declare module '@tiptap/core' { declare module '@tiptap/core' {

View File

@ -1,3 +1,4 @@
import { IUser } from '@think/domains';
import { mergeAttributes, Node } from '@tiptap/core'; import { mergeAttributes, Node } from '@tiptap/core';
import { ReactNodeViewRenderer } from '@tiptap/react'; import { ReactNodeViewRenderer } from '@tiptap/react';
import { STATUS_COLORS, StatusWrapper } from 'tiptap/core/wrappers/status'; import { STATUS_COLORS, StatusWrapper } from 'tiptap/core/wrappers/status';
@ -7,7 +8,7 @@ type IStatusAttrs = {
color?: string; color?: string;
text?: string; text?: string;
defaultShowPicker?: boolean; defaultShowPicker?: boolean;
createUser: string; createUser?: IUser['id'];
}; };
declare module '@tiptap/core' { declare module '@tiptap/core' {