From d00d68af9c34ef2a05fefe468354fab0ff557da7 Mon Sep 17 00:00:00 2001
From: Patrick Simmelbauer
Date: Thu, 21 Jun 2018 15:44:44 +0200
Subject: [PATCH] Update prosemirror-transform typings to 1.1
---
types/prosemirror-transform/index.d.ts | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/types/prosemirror-transform/index.d.ts b/types/prosemirror-transform/index.d.ts
index 88f97ff9e4..974a6e8475 100644
--- a/types/prosemirror-transform/index.d.ts
+++ b/types/prosemirror-transform/index.d.ts
@@ -1,4 +1,4 @@
-// Type definitions for prosemirror-transform 1.0
+// Type definitions for prosemirror-transform 1.1
// Project: https://github.com/ProseMirror/prosemirror-transform
// Definitions by: Bradley Ayers
// David Hahn
@@ -143,6 +143,12 @@ export class Mapping implements Mappable {
* mirroring information).
*/
appendMapping(mapping: Mapping): void;
+ /**
+ * Finds the offset of the step map that mirrors the map at the
+ * given offset, in this mapping (as per the second argument to
+ * appendMap).
+ */
+ getMirror(n: number): number | undefined | null;
/**
* Append the inverse of the given mapping to this one.
*/
@@ -550,3 +556,15 @@ export function insertPoint(
pos: number,
nodeType: NodeType
): number | null | undefined;
+/**
+ * Finds a position at or around the given position where the given
+ * slice can be inserted. Will look at parent nodes' nearest boundary
+ * and try there, even if the original position wasn't directly at
+ * the start or end of that node. Returns null when no position was
+ * found.
+ */
+export function dropPoint(
+ doc: ProsemirrorNode,
+ pos: number,
+ slice: Slice
+): number | null | undefined;