Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDB cursor result types were incorrectly abstract #705

Merged
merged 1 commit into from
May 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions api-reports/2_12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14061,8 +14061,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 @@ -14086,8 +14086,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 @@ -14126,8 +14126,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 @@ -14061,8 +14061,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 @@ -14086,8 +14086,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 @@ -14126,8 +14126,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
}