Skip to content

Commit

Permalink
Merge pull request #705 from scala-js/topic/idb-cursors
Browse files Browse the repository at this point in the history
IDB cursor result types were incorrectly abstract
  • Loading branch information
japgolly authored May 30, 2022
2 parents 883d3d9 + dd5dfc2 commit 9427efd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions api-reports/2_12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14402,8 +14402,8 @@ IDBIndex[JC] def keyPath: IDBKeyPath
IDBIndex[JC] val multiEntry: Boolean
IDBIndex[JC] def name: String
IDBIndex[JC] def objectStore: IDBObjectStore
IDBIndex[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
IDBIndex[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorReadOnly[S]]
IDBIndex[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorWithValue[S]]
IDBIndex[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
IDBIndex[JC] def unique: Boolean
IDBKeyRange[JC] def lower: IDBKey
IDBKeyRange[JC] def lowerOpen: Boolean
Expand All @@ -14427,8 +14427,8 @@ IDBObjectStore[JC] def index(name: String): IDBIndex
IDBObjectStore[JC] def indexNames: DOMStringList
IDBObjectStore[JC] def keyPath: IDBKeyPath
IDBObjectStore[JC] def name: String
IDBObjectStore[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
IDBObjectStore[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorReadOnly[S]]
IDBObjectStore[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorWithValue[S]]
IDBObjectStore[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
IDBObjectStore[JC] def put(value: IDBValue, key: IDBKey?): IDBRequest[IDBObjectStore, IDBKey]
IDBObjectStore[JC] def transaction: IDBTransaction
IDBOpenDBRequest[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit
Expand Down Expand Up @@ -14467,8 +14467,8 @@ IDBStoreLike[JT] def getAllKeys(query: js.UndefOr[IDBKeyRange | IDBKey]?, count:
IDBStoreLike[JT] def getKey(key: IDBKey): IDBRequest[S, js.UndefOr[IDBKey]]
IDBStoreLike[JT] def keyPath: IDBKeyPath
IDBStoreLike[JT] def name: String
IDBStoreLike[JT] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
IDBStoreLike[JT] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorReadOnly[S]]
IDBStoreLike[JT] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorWithValue[S]]
IDBStoreLike[JT] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
IDBTransaction[JC] def abort(): Unit
IDBTransaction[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit
IDBTransaction[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit
Expand Down
12 changes: 6 additions & 6 deletions api-reports/2_13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14402,8 +14402,8 @@ IDBIndex[JC] def keyPath: IDBKeyPath
IDBIndex[JC] val multiEntry: Boolean
IDBIndex[JC] def name: String
IDBIndex[JC] def objectStore: IDBObjectStore
IDBIndex[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
IDBIndex[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorReadOnly[S]]
IDBIndex[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorWithValue[S]]
IDBIndex[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
IDBIndex[JC] def unique: Boolean
IDBKeyRange[JC] def lower: IDBKey
IDBKeyRange[JC] def lowerOpen: Boolean
Expand All @@ -14427,8 +14427,8 @@ IDBObjectStore[JC] def index(name: String): IDBIndex
IDBObjectStore[JC] def indexNames: DOMStringList
IDBObjectStore[JC] def keyPath: IDBKeyPath
IDBObjectStore[JC] def name: String
IDBObjectStore[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
IDBObjectStore[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorReadOnly[S]]
IDBObjectStore[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorWithValue[S]]
IDBObjectStore[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
IDBObjectStore[JC] def put(value: IDBValue, key: IDBKey?): IDBRequest[IDBObjectStore, IDBKey]
IDBObjectStore[JC] def transaction: IDBTransaction
IDBOpenDBRequest[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit
Expand Down Expand Up @@ -14467,8 +14467,8 @@ IDBStoreLike[JT] def getAllKeys(query: js.UndefOr[IDBKeyRange | IDBKey]?, count:
IDBStoreLike[JT] def getKey(key: IDBKey): IDBRequest[S, js.UndefOr[IDBKey]]
IDBStoreLike[JT] def keyPath: IDBKeyPath
IDBStoreLike[JT] def name: String
IDBStoreLike[JT] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
IDBStoreLike[JT] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorReadOnly[S]]
IDBStoreLike[JT] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorWithValue[S]]
IDBStoreLike[JT] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
IDBTransaction[JC] def abort(): Unit
IDBTransaction[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit
IDBTransaction[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit
Expand Down
4 changes: 2 additions & 2 deletions dom/src/main/scala/org/scalajs/dom/IDBStoreLike.scala
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,13 @@ trait IDBStoreLike[S] extends js.Object {
* [[IDBRequest]] with the `target` value being a new cursor or `null`.
*/
def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey] = js.native,
direction: js.UndefOr[IDBCursorDirection] = js.native): IDBRequest[S, IDBCursor[S]] = js.native
direction: js.UndefOr[IDBCursorDirection] = js.native): IDBRequest[S, IDBCursorWithValue[S]] = js.native

/** The method sets the position of the cursor to the appropriate key, based on the specified direction.
*
* @return
* [[IDBRequest]] with the `target` value being a new cursor or `null`.
*/
def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey] = js.native,
direction: js.UndefOr[IDBCursorDirection] = js.native): IDBRequest[S, IDBCursorReadOnly[S]] = js.native
direction: js.UndefOr[IDBCursorDirection] = js.native): IDBRequest[S, IDBCursor[S]] = js.native
}

0 comments on commit 9427efd

Please sign in to comment.