Fixes #2979. Since the ProseMirror TypeScript upgrade, these have always returned false, since the Selection type tree are all classes now.
6 lines
167 B
TypeScript
6 lines
167 B
TypeScript
import { TextSelection } from 'prosemirror-state'
|
|
|
|
export function isTextSelection(value: unknown): value is TextSelection {
|
|
return value instanceof TextSelection
|
|
}
|