Skip to content

Commit 9427efd

Browse files
authored
Merge pull request #705 from scala-js/topic/idb-cursors
IDB cursor result types were incorrectly abstract
2 parents 883d3d9 + dd5dfc2 commit 9427efd

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

api-reports/2_12.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -14402,8 +14402,8 @@ IDBIndex[JC] def keyPath: IDBKeyPath
1440214402
IDBIndex[JC] val multiEntry: Boolean
1440314403
IDBIndex[JC] def name: String
1440414404
IDBIndex[JC] def objectStore: IDBObjectStore
14405-
IDBIndex[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
14406-
IDBIndex[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorReadOnly[S]]
14405+
IDBIndex[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorWithValue[S]]
14406+
IDBIndex[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
1440714407
IDBIndex[JC] def unique: Boolean
1440814408
IDBKeyRange[JC] def lower: IDBKey
1440914409
IDBKeyRange[JC] def lowerOpen: Boolean
@@ -14427,8 +14427,8 @@ IDBObjectStore[JC] def index(name: String): IDBIndex
1442714427
IDBObjectStore[JC] def indexNames: DOMStringList
1442814428
IDBObjectStore[JC] def keyPath: IDBKeyPath
1442914429
IDBObjectStore[JC] def name: String
14430-
IDBObjectStore[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
14431-
IDBObjectStore[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorReadOnly[S]]
14430+
IDBObjectStore[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorWithValue[S]]
14431+
IDBObjectStore[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
1443214432
IDBObjectStore[JC] def put(value: IDBValue, key: IDBKey?): IDBRequest[IDBObjectStore, IDBKey]
1443314433
IDBObjectStore[JC] def transaction: IDBTransaction
1443414434
IDBOpenDBRequest[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit
@@ -14467,8 +14467,8 @@ IDBStoreLike[JT] def getAllKeys(query: js.UndefOr[IDBKeyRange | IDBKey]?, count:
1446714467
IDBStoreLike[JT] def getKey(key: IDBKey): IDBRequest[S, js.UndefOr[IDBKey]]
1446814468
IDBStoreLike[JT] def keyPath: IDBKeyPath
1446914469
IDBStoreLike[JT] def name: String
14470-
IDBStoreLike[JT] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
14471-
IDBStoreLike[JT] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorReadOnly[S]]
14470+
IDBStoreLike[JT] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorWithValue[S]]
14471+
IDBStoreLike[JT] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
1447214472
IDBTransaction[JC] def abort(): Unit
1447314473
IDBTransaction[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit
1447414474
IDBTransaction[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit

api-reports/2_13.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -14402,8 +14402,8 @@ IDBIndex[JC] def keyPath: IDBKeyPath
1440214402
IDBIndex[JC] val multiEntry: Boolean
1440314403
IDBIndex[JC] def name: String
1440414404
IDBIndex[JC] def objectStore: IDBObjectStore
14405-
IDBIndex[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
14406-
IDBIndex[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorReadOnly[S]]
14405+
IDBIndex[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorWithValue[S]]
14406+
IDBIndex[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
1440714407
IDBIndex[JC] def unique: Boolean
1440814408
IDBKeyRange[JC] def lower: IDBKey
1440914409
IDBKeyRange[JC] def lowerOpen: Boolean
@@ -14427,8 +14427,8 @@ IDBObjectStore[JC] def index(name: String): IDBIndex
1442714427
IDBObjectStore[JC] def indexNames: DOMStringList
1442814428
IDBObjectStore[JC] def keyPath: IDBKeyPath
1442914429
IDBObjectStore[JC] def name: String
14430-
IDBObjectStore[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
14431-
IDBObjectStore[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorReadOnly[S]]
14430+
IDBObjectStore[JC] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorWithValue[S]]
14431+
IDBObjectStore[JC] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
1443214432
IDBObjectStore[JC] def put(value: IDBValue, key: IDBKey?): IDBRequest[IDBObjectStore, IDBKey]
1443314433
IDBObjectStore[JC] def transaction: IDBTransaction
1443414434
IDBOpenDBRequest[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit
@@ -14467,8 +14467,8 @@ IDBStoreLike[JT] def getAllKeys(query: js.UndefOr[IDBKeyRange | IDBKey]?, count:
1446714467
IDBStoreLike[JT] def getKey(key: IDBKey): IDBRequest[S, js.UndefOr[IDBKey]]
1446814468
IDBStoreLike[JT] def keyPath: IDBKeyPath
1446914469
IDBStoreLike[JT] def name: String
14470-
IDBStoreLike[JT] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
14471-
IDBStoreLike[JT] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorReadOnly[S]]
14470+
IDBStoreLike[JT] def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursorWithValue[S]]
14471+
IDBStoreLike[JT] def openKeyCursor(range: js.UndefOr[IDBKeyRange | IDBKey]?, direction: js.UndefOr[IDBCursorDirection]?): IDBRequest[S, IDBCursor[S]]
1447214472
IDBTransaction[JC] def abort(): Unit
1447314473
IDBTransaction[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit
1447414474
IDBTransaction[JC] def addEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit

dom/src/main/scala/org/scalajs/dom/IDBStoreLike.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ trait IDBStoreLike[S] extends js.Object {
8383
* [[IDBRequest]] with the `target` value being a new cursor or `null`.
8484
*/
8585
def openCursor(range: js.UndefOr[IDBKeyRange | IDBKey] = js.native,
86-
direction: js.UndefOr[IDBCursorDirection] = js.native): IDBRequest[S, IDBCursor[S]] = js.native
86+
direction: js.UndefOr[IDBCursorDirection] = js.native): IDBRequest[S, IDBCursorWithValue[S]] = js.native
8787

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

0 commit comments

Comments
 (0)