Files
tiptap/packages/core/src/helpers/isTextSelection.ts
Asherah Connor 574cd69e06 fix(core): isNodeSelection, isTextSelection not always false (#3089)
Fixes #2979.  Since the ProseMirror TypeScript upgrade, these have
always returned false, since the Selection type tree are all classes
now.
2022-08-22 13:05:53 +02:00

6 lines
167 B
TypeScript

import { TextSelection } from 'prosemirror-state'
export function isTextSelection(value: unknown): value is TextSelection {
return value instanceof TextSelection
}