1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-04-21 13:51:59 +02:00

Make Range.transform options optional (#3794)

This commit is contained in:
Jason Tamulonis 2020-07-24 12:27:22 -07:00 committed by GitHub
parent 93fe251517
commit 1cf63f0a19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -181,7 +181,9 @@ export const Range = {
transform(
range: Range,
op: Operation,
options: { affinity: 'forward' | 'backward' | 'outward' | 'inward' | null }
options: {
affinity?: 'forward' | 'backward' | 'outward' | 'inward' | null
} = {}
): Range | null {
const { affinity = 'inward' } = options
let affinityAnchor: 'forward' | 'backward' | null