Skip to content

Commit

Permalink
fixed types in richtext
Browse files Browse the repository at this point in the history
  • Loading branch information
GhitaNektt committed Jul 25, 2024
1 parent d35e020 commit 3033c3a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/alto/src/components/RichText/internal/handlers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { RangeStatic } from 'quill';
import type { Range } from 'quill';
import Quill from 'quill';

export async function customImage(quill: Quill | null, range: RangeStatic | undefined) {
export async function customImage(quill: Quill | null, range: Range | undefined) {
if (!quill || !range) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/alto/src/components/RichText/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Quill from 'quill';

export function replaceIcons(customIcons: { [key: string]: any }): void {
const icons = Quill.import('ui/icons');
const icons = Quill.import('ui/icons') as { [key: string]: string };
icons.undo = '';
icons.redo = '';
icons.customImage = '';
Expand Down
4 changes: 2 additions & 2 deletions packages/vue3/src/components/RichText/internal/handlers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { RangeStatic } from 'quill';
import type { Range } from 'quill';
import Quill from 'quill';

export async function customImage(quill: Quill | null, range: RangeStatic | undefined) {
export async function customImage(quill: Quill | null, range: Range | undefined) {
if (!quill || !range) {
return;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/vue3/src/components/RichText/utils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import Quill from 'quill';

export function replaceIcons(customIcons: { [key: string]: any }): void {
const icons = Quill.import('ui/icons');
const icons = Quill.import('ui/icons') as { [key: string]: string };

icons.undo = '';
icons.redo = '';
icons.customImage = '';
Expand Down

0 comments on commit 3033c3a

Please sign in to comment.