Skip to content

Commit b613096

Browse files
authored
Merge pull request #592 from scala-js/topic/opaque-type
Use opaque types for Scala 3
2 parents af021a7 + 9ee3b46 commit b613096

File tree

72 files changed

+753
-34
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+753
-34
lines changed

api-reports/2_12.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13978,10 +13978,10 @@ IDBCursor[JC] def primaryKey: IDBKey
1397813978
IDBCursor[JC] def source: S
1397913979
IDBCursor[JC] def update(value: IDBValue): IDBRequest[S, IDBKey]
1398013980
IDBCursorDirection[JT]
13981-
IDBCursorDirection[SO] def next: IDBCursorDirection
13982-
IDBCursorDirection[SO] def nextunique: IDBCursorDirection
13983-
IDBCursorDirection[SO] def prev: IDBCursorDirection
13984-
IDBCursorDirection[SO] def prevunique: IDBCursorDirection
13981+
IDBCursorDirection[SO] val next: IDBCursorDirection
13982+
IDBCursorDirection[SO] val nextunique: IDBCursorDirection
13983+
IDBCursorDirection[SO] val prev: IDBCursorDirection
13984+
IDBCursorDirection[SO] val prevunique: IDBCursorDirection
1398513985
IDBCursorReadOnly[JC] def advance(count: Double): Unit
1398613986
IDBCursorReadOnly[JC] def continue(key: IDBKey?): Unit
1398713987
IDBCursorReadOnly[JC] def direction: IDBCursorDirection
@@ -14126,13 +14126,13 @@ IDBTransaction[JC] var onerror: js.Function1[Event, _]
1412614126
IDBTransaction[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit
1412714127
IDBTransaction[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit
1412814128
IDBTransactionDurability[JT]
14129-
IDBTransactionDurability[SO] def default: IDBTransactionDurability
14130-
IDBTransactionDurability[SO] def relaxed: IDBTransactionDurability
14131-
IDBTransactionDurability[SO] def strict: IDBTransactionDurability
14129+
IDBTransactionDurability[SO] val default: IDBTransactionDurability
14130+
IDBTransactionDurability[SO] val relaxed: IDBTransactionDurability
14131+
IDBTransactionDurability[SO] val strict: IDBTransactionDurability
1413214132
IDBTransactionMode[JT]
14133-
IDBTransactionMode[SO] def readonly: IDBTransactionMode
14134-
IDBTransactionMode[SO] def readwrite: IDBTransactionMode
14135-
IDBTransactionMode[SO] def versionchange: IDBTransactionMode
14133+
IDBTransactionMode[SO] val readonly: IDBTransactionMode
14134+
IDBTransactionMode[SO] val readwrite: IDBTransactionMode
14135+
IDBTransactionMode[SO] val versionchange: IDBTransactionMode
1413614136
IDBTransactionOptions[JT] val durability: js.UndefOr[IDBTransactionDurability]
1413714137
IDBVersionChangeEvent[JC] def bubbles: Boolean
1413814138
IDBVersionChangeEvent[JC] def cancelBubble: Boolean

api-reports/2_13.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13978,10 +13978,10 @@ IDBCursor[JC] def primaryKey: IDBKey
1397813978
IDBCursor[JC] def source: S
1397913979
IDBCursor[JC] def update(value: IDBValue): IDBRequest[S, IDBKey]
1398013980
IDBCursorDirection[JT]
13981-
IDBCursorDirection[SO] def next: IDBCursorDirection
13982-
IDBCursorDirection[SO] def nextunique: IDBCursorDirection
13983-
IDBCursorDirection[SO] def prev: IDBCursorDirection
13984-
IDBCursorDirection[SO] def prevunique: IDBCursorDirection
13981+
IDBCursorDirection[SO] val next: IDBCursorDirection
13982+
IDBCursorDirection[SO] val nextunique: IDBCursorDirection
13983+
IDBCursorDirection[SO] val prev: IDBCursorDirection
13984+
IDBCursorDirection[SO] val prevunique: IDBCursorDirection
1398513985
IDBCursorReadOnly[JC] def advance(count: Double): Unit
1398613986
IDBCursorReadOnly[JC] def continue(key: IDBKey?): Unit
1398713987
IDBCursorReadOnly[JC] def direction: IDBCursorDirection
@@ -14126,13 +14126,13 @@ IDBTransaction[JC] var onerror: js.Function1[Event, _]
1412614126
IDBTransaction[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], options: EventListenerOptions): Unit
1412714127
IDBTransaction[JC] def removeEventListener[T <: Event](`type`: String, listener: js.Function1[T, _], useCapture: Boolean?): Unit
1412814128
IDBTransactionDurability[JT]
14129-
IDBTransactionDurability[SO] def default: IDBTransactionDurability
14130-
IDBTransactionDurability[SO] def relaxed: IDBTransactionDurability
14131-
IDBTransactionDurability[SO] def strict: IDBTransactionDurability
14129+
IDBTransactionDurability[SO] val default: IDBTransactionDurability
14130+
IDBTransactionDurability[SO] val relaxed: IDBTransactionDurability
14131+
IDBTransactionDurability[SO] val strict: IDBTransactionDurability
1413214132
IDBTransactionMode[JT]
14133-
IDBTransactionMode[SO] def readonly: IDBTransactionMode
14134-
IDBTransactionMode[SO] def readwrite: IDBTransactionMode
14135-
IDBTransactionMode[SO] def versionchange: IDBTransactionMode
14133+
IDBTransactionMode[SO] val readonly: IDBTransactionMode
14134+
IDBTransactionMode[SO] val readwrite: IDBTransactionMode
14135+
IDBTransactionMode[SO] val versionchange: IDBTransactionMode
1413614136
IDBTransactionOptions[JT] val durability: js.UndefOr[IDBTransactionDurability]
1413714137
IDBVersionChangeEvent[JC] def bubbles: Boolean
1413814138
IDBVersionChangeEvent[JC] def cancelBubble: Boolean

src/main/scala/org/scalajs/dom/IDBCursorDirection.scala renamed to src/main/scala-2/org/scalajs/dom/IDBCursorDirection.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ object IDBCursorDirection {
1616
/** The cursor shows all records, including duplicates. It starts at the upper bound of the key range and moves
1717
* downwards (monotonically decreasing in the order of keys).
1818
*/
19-
@inline def prev: IDBCursorDirection = "prev".asInstanceOf[IDBCursorDirection]
19+
val prev: IDBCursorDirection = "prev".asInstanceOf[IDBCursorDirection]
2020

2121
/** The cursor shows all records, excluding duplicates. If multiple records exist with the same key, only the first
2222
* one iterated is retrieved. It starts at the upper bound of the key range and moves downwards.
2323
*/
24-
@inline def prevunique: IDBCursorDirection = "prevunique".asInstanceOf[IDBCursorDirection]
24+
val prevunique: IDBCursorDirection = "prevunique".asInstanceOf[IDBCursorDirection]
2525

2626
/** The cursor shows all records, including duplicates. It starts at the lower bound of the key range and moves
2727
* upwards (monotonically increasing in the order of keys).
2828
*/
29-
@inline def next: IDBCursorDirection = "next".asInstanceOf[IDBCursorDirection]
29+
val next: IDBCursorDirection = "next".asInstanceOf[IDBCursorDirection]
3030

3131
/** The cursor shows all records, excluding duplicates. If multiple records exist with the same key, only the first
3232
* one iterated is retrieved. It starts at the lower bound of the key range and moves upwards.
3333
*/
34-
@inline def nextunique: IDBCursorDirection = "nextunique".asInstanceOf[IDBCursorDirection]
34+
val nextunique: IDBCursorDirection = "nextunique".asInstanceOf[IDBCursorDirection]
3535
}

src/main/scala/org/scalajs/dom/IDBTransactionDurability.scala renamed to src/main/scala-2/org/scalajs/dom/IDBTransactionDurability.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import scala.scalajs.js
1212
sealed trait IDBTransactionDurability extends js.Any
1313

1414
object IDBTransactionDurability {
15-
@inline def default: IDBTransactionDurability = "default".asInstanceOf[IDBTransactionDurability]
16-
@inline def strict: IDBTransactionDurability = "strict".asInstanceOf[IDBTransactionDurability]
17-
@inline def relaxed: IDBTransactionDurability = "relaxed".asInstanceOf[IDBTransactionDurability]
15+
val default: IDBTransactionDurability = "default".asInstanceOf[IDBTransactionDurability]
16+
val strict: IDBTransactionDurability = "strict".asInstanceOf[IDBTransactionDurability]
17+
val relaxed: IDBTransactionDurability = "relaxed".asInstanceOf[IDBTransactionDurability]
1818
}

src/main/scala/org/scalajs/dom/IDBTransactionMode.scala renamed to src/main/scala-2/org/scalajs/dom/IDBTransactionMode.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ sealed trait IDBTransactionMode extends js.Any
1717
object IDBTransactionMode {
1818

1919
/** Allows data to be read but not changed. It is the default transaction mode. */
20-
@inline def readonly: IDBTransactionMode = "readonly".asInstanceOf[IDBTransactionMode]
20+
val readonly: IDBTransactionMode = "readonly".asInstanceOf[IDBTransactionMode]
2121

2222
/** Allows any operation to be performed, including ones that delete and create object stores and indexes. This mode
2323
* is for updating the version number of transactions that were started using the setVersion() method of IDBDatabase
2424
* objects. Transactions of this mode cannot run concurrently with other transactions.
2525
*/
26-
@inline def versionchange: IDBTransactionMode = "versionchange".asInstanceOf[IDBTransactionMode]
26+
val versionchange: IDBTransactionMode = "versionchange".asInstanceOf[IDBTransactionMode]
2727

2828
/** Allows reading and writing of data in existing data stores to be changed. */
29-
@inline def readwrite: IDBTransactionMode = "readwrite".asInstanceOf[IDBTransactionMode]
29+
val readwrite: IDBTransactionMode = "readwrite".asInstanceOf[IDBTransactionMode]
3030
}

0 commit comments

Comments
 (0)