Skip to content

Commit 2f16eb0

Browse files
committed
Browser. Use JsDouble and JsInt (#2449)
1 parent b50fd39 commit 2f16eb0

21 files changed

+53
-32
lines changed

kotlin-browser/src/commonMain/generated/web/audio/AudioParam.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package web.audio
44

55
import js.array.ReadonlyArray
6+
import js.core.JsDouble
67
import js.typedarrays.Float32Array
78

89
/**
@@ -81,7 +82,7 @@ private constructor() {
8182
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioParam/setValueCurveAtTime)
8283
*/
8384
fun setValueCurveAtTime(
84-
values: ReadonlyArray<Double>,
85+
values: ReadonlyArray<JsDouble>,
8586
startTime: Double,
8687
duration: Double,
8788
): AudioParam

kotlin-browser/src/commonMain/generated/web/audio/AudioWorkletNodeOptions.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package web.audio
44

55
import js.array.ReadonlyArray
66
import js.core.JsAny
7+
import js.core.JsDouble
78
import js.core.JsString
89
import js.objects.JsPlainObject
910
import js.objects.ReadonlyRecord
@@ -14,6 +15,6 @@ external interface AudioWorkletNodeOptions :
1415
val numberOfInputs: Int?
1516
val numberOfOutputs: Int?
1617
val outputChannelCount: ReadonlyArray<Number>?
17-
val parameterData: ReadonlyRecord<JsString, Double>?
18+
val parameterData: ReadonlyRecord<JsString, JsDouble>?
1819
val processorOptions: JsAny?
1920
}

kotlin-browser/src/commonMain/generated/web/audio/BaseAudioContext.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package web.audio
44

55
import js.array.ReadonlyArray
66
import js.buffer.ArrayBuffer
7+
import js.core.JsDouble
78
import js.promise.Promise
89
import js.typedarrays.Float32Array
910
import seskar.js.JsAsync
@@ -115,8 +116,8 @@ private constructor() :
115116
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createIIRFilter)
116117
*/
117118
fun createIIRFilter(
118-
feedforward: ReadonlyArray<Double>,
119-
feedback: ReadonlyArray<Double>,
119+
feedforward: ReadonlyArray<JsDouble>,
120+
feedback: ReadonlyArray<JsDouble>,
120121
): IIRFilterNode
121122

122123
/**
@@ -133,8 +134,8 @@ private constructor() :
133134
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createPeriodicWave)
134135
*/
135136
fun createPeriodicWave(
136-
real: ReadonlyArray<Double>,
137-
imag: ReadonlyArray<Double>,
137+
real: ReadonlyArray<JsDouble>,
138+
imag: ReadonlyArray<JsDouble>,
138139
constraints: PeriodicWaveConstraints = definedExternally,
139140
): PeriodicWave
140141

kotlin-browser/src/commonMain/generated/web/audio/PeriodicWaveOptions.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
package web.audio
44

55
import js.array.ReadonlyArray
6+
import js.core.JsDouble
67
import js.objects.JsPlainObject
78

89
@JsPlainObject
910
external interface PeriodicWaveOptions :
1011
PeriodicWaveConstraints {
11-
val imag: ReadonlyArray<Double> /* | Float32Array */?
12-
val real: ReadonlyArray<Double> /* | Float32Array */?
12+
val imag: ReadonlyArray<JsDouble> /* | Float32Array */?
13+
val real: ReadonlyArray<JsDouble> /* | Float32Array */?
1314
}

kotlin-browser/src/commonMain/generated/web/audio/WaveShaperOptions.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
package web.audio
44

55
import js.array.ReadonlyArray
6+
import js.core.JsDouble
67
import js.objects.JsPlainObject
78

89
@JsPlainObject
910
external interface WaveShaperOptions :
1011
AudioNodeOptions {
11-
val curve: ReadonlyArray<Double> /* | Float32Array */?
12+
val curve: ReadonlyArray<JsDouble> /* | Float32Array */?
1213
val oversample: OverSampleType?
1314
}

kotlin-browser/src/commonMain/generated/web/canvas/CanvasPathDrawingStyles.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package web.canvas
44

55
import js.array.ReadonlyArray
6+
import js.core.JsDouble
67

78
sealed external interface CanvasPathDrawingStyles {
89
/**
@@ -33,10 +34,10 @@ sealed external interface CanvasPathDrawingStyles {
3334
/**
3435
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/getLineDash)
3536
*/
36-
fun getLineDash(): ReadonlyArray<Double>
37+
fun getLineDash(): ReadonlyArray<JsDouble>
3738

3839
/**
3940
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/setLineDash)
4041
*/
41-
fun setLineDash(segments: ReadonlyArray<Double>)
42+
fun setLineDash(segments: ReadonlyArray<JsDouble>)
4243
}

kotlin-browser/src/commonMain/generated/web/cssom/CSSNumericArray.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package web.cssom
44

55
import js.array.JsTuple2
66
import js.collections.ListLike
7+
import js.core.JsInt
78
import js.iterable.JsIterator
89

910
/**
@@ -17,8 +18,8 @@ private constructor() :
1718
*/
1819
override val length: Int
1920

20-
override fun entries(): JsIterator<JsTuple2<Int, CSSNumericValue>>
21-
override fun keys(): JsIterator<Int>
21+
override fun entries(): JsIterator<JsTuple2<JsInt, CSSNumericValue>>
22+
override fun keys(): JsIterator<JsInt>
2223
override fun values(): JsIterator<CSSNumericValue>
2324
override fun forEach(action: (item: CSSNumericValue) -> Unit)
2425
}

kotlin-browser/src/commonMain/generated/web/cssom/CSSTransformValue.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package web.cssom
55
import js.array.JsTuple2
66
import js.array.ReadonlyArray
77
import js.collections.ListLike
8+
import js.core.JsInt
89
import js.iterable.JsIterator
910
import web.geometry.DOMMatrix
1011

@@ -30,8 +31,8 @@ open external class CSSTransformValue(
3031
*/
3132
fun toMatrix(): DOMMatrix
3233

33-
override fun entries(): JsIterator<JsTuple2<Int, CSSTransformComponent>>
34-
override fun keys(): JsIterator<Int>
34+
override fun entries(): JsIterator<JsTuple2<JsInt, CSSTransformComponent>>
35+
override fun keys(): JsIterator<JsInt>
3536
override fun values(): JsIterator<CSSTransformComponent>
3637
override fun forEach(action: (item: CSSTransformComponent) -> Unit)
3738
}

kotlin-browser/src/commonMain/generated/web/cssom/CSSUnparsedValue.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ package web.cssom
55
import js.array.JsTuple2
66
import js.array.ReadonlyArray
77
import js.collections.ListLike
8+
import js.core.JsInt
89
import js.iterable.JsIterator
910

1011
/**
@@ -19,8 +20,8 @@ open external class CSSUnparsedValue(
1920
*/
2021
override val length: Int
2122

22-
override fun entries(): JsIterator<JsTuple2<Int, CSSUnparsedSegment>>
23-
override fun keys(): JsIterator<Int>
23+
override fun entries(): JsIterator<JsTuple2<JsInt, CSSUnparsedSegment>>
24+
override fun keys(): JsIterator<JsInt>
2425
override fun values(): JsIterator<CSSUnparsedSegment>
2526
override fun forEach(action: (item: CSSUnparsedSegment) -> Unit)
2627
}

kotlin-browser/src/commonMain/generated/web/dom/DOMTokenList.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package web.dom
44

55
import js.array.JsTuple2
66
import js.collections.ListLike
7+
import js.core.JsInt
78
import js.core.JsString
89
import js.iterable.JsIterator
910

@@ -108,8 +109,8 @@ private constructor() :
108109
force: Boolean = definedExternally,
109110
): Boolean
110111

111-
override fun entries(): JsIterator<JsTuple2<Int, JsString>>
112-
override fun keys(): JsIterator<Int>
112+
override fun entries(): JsIterator<JsTuple2<JsInt, JsString>>
113+
override fun keys(): JsIterator<JsInt>
113114
override fun values(): JsIterator<JsString>
114115
override fun forEach(action: (item: String) -> Unit)
115116
}

kotlin-browser/src/commonMain/generated/web/gamepad/Gamepad.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package web.gamepad
44

55
import js.array.ReadonlyArray
6+
import js.core.JsDouble
67
import web.time.DOMHighResTimeStamp
78

89
/**
@@ -15,7 +16,7 @@ private constructor() {
1516
/**
1617
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Gamepad/axes)
1718
*/
18-
val axes: ReadonlyArray<Double>
19+
val axes: ReadonlyArray<JsDouble>
1920

2021
/**
2122
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Gamepad/buttons)

kotlin-browser/src/commonMain/generated/web/geometry/DOMMatrix.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package web.geometry
44

55
import js.array.ReadonlyArray
6+
import js.core.JsDouble
67
import js.typedarrays.Float32Array
78
import js.typedarrays.Float64Array
89

@@ -12,7 +13,7 @@ import js.typedarrays.Float64Array
1213
open external class DOMMatrix(
1314
init: String = definedExternally,
1415
) : DOMMatrixReadOnly {
15-
constructor(init: ReadonlyArray<Double>)
16+
constructor(init: ReadonlyArray<JsDouble>)
1617

1718
/**
1819
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrix#instance_properties)

kotlin-browser/src/commonMain/generated/web/geometry/DOMMatrixReadOnly.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package web.geometry
44

55
import js.array.ReadonlyArray
66
import js.core.JsAny
7+
import js.core.JsDouble
78
import js.typedarrays.Float32Array
89
import js.typedarrays.Float64Array
910

@@ -13,7 +14,7 @@ import js.typedarrays.Float64Array
1314
open external class DOMMatrixReadOnly(
1415
init: String = definedExternally,
1516
) {
16-
constructor(init: ReadonlyArray<Double>)
17+
constructor(init: ReadonlyArray<JsDouble>)
1718

1819
/**
1920
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/DOMMatrixReadOnly#instance_properties)

kotlin-browser/src/commonMain/generated/web/idb/IDBIndex.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package web.idb
44

55
import js.array.ReadonlyArray
66
import js.core.JsAny
7+
import js.core.JsInt
78

89
/**
910
* IDBIndex interface of the IndexedDB API provides asynchronous access to an index in a database. An index is a kind of object store for looking up records in another object store, called the referenced object store. You use this interface to retrieve data.
@@ -48,8 +49,8 @@ private constructor() {
4849
*
4950
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBIndex/count)
5051
*/
51-
fun count(query: IDBValidKey = definedExternally): IDBRequest<Int>
52-
fun count(query: IDBKeyRange): IDBRequest<Int>
52+
fun count(query: IDBValidKey = definedExternally): IDBRequest<JsInt>
53+
fun count(query: IDBKeyRange): IDBRequest<JsInt>
5354

5455
/**
5556
* Retrieves the value of the first record matching the given key or key range in query.

kotlin-browser/src/commonMain/generated/web/idb/IDBObjectStore.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package web.idb
44

55
import js.array.ReadonlyArray
66
import js.core.JsAny
7+
import js.core.JsInt
78
import js.core.JsString
89
import js.core.Void
910
import web.dom.DOMStringList
@@ -82,8 +83,8 @@ private constructor() {
8283
*
8384
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IDBObjectStore/count)
8485
*/
85-
fun count(query: IDBValidKey = definedExternally): IDBRequest<Int>
86-
fun count(query: IDBKeyRange): IDBRequest<Int>
86+
fun count(query: IDBValidKey = definedExternally): IDBRequest<JsInt>
87+
fun count(query: IDBKeyRange): IDBRequest<JsInt>
8788

8889
/**
8990
* Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException.

kotlin-browser/src/commonMain/generated/web/intersection/IntersectionObserver.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package web.intersection
44

55
import js.array.ReadonlyArray
6+
import js.core.JsDouble
67
import web.dom.Element
78
import web.dom.ParentNode
89

@@ -28,7 +29,7 @@ open external class IntersectionObserver(
2829
/**
2930
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/thresholds)
3031
*/
31-
val thresholds: ReadonlyArray<Double>
32+
val thresholds: ReadonlyArray<JsDouble>
3233

3334
/**
3435
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/IntersectionObserver/disconnect)

kotlin-browser/src/commonMain/generated/web/intersection/IntersectionObserverInit.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
package web.intersection
44

55
import js.array.ReadonlyArray
6+
import js.core.JsDouble
67
import js.objects.JsPlainObject
78
import web.dom.ParentNode
89

910
@JsPlainObject
1011
external interface IntersectionObserverInit {
1112
val root: ParentNode /* Element | Document */?
1213
val rootMargin: String?
13-
val threshold: ReadonlyArray<Double>?
14+
val threshold: ReadonlyArray<JsDouble>?
1415
}

kotlin-browser/src/commonMain/generated/web/midi/MIDIOutput.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
package web.midi
44

55
import js.array.ReadonlyArray
6+
import js.core.JsDouble
67
import web.time.DOMHighResTimeStamp
78

89
/**
@@ -17,7 +18,7 @@ private constructor() :
1718
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/MIDIOutput/send)
1819
*/
1920
fun send(
20-
data: ReadonlyArray<Double>,
21+
data: ReadonlyArray<JsDouble>,
2122
timestamp: DOMHighResTimeStamp = definedExternally,
2223
)
2324
}

kotlin-browser/src/commonMain/generated/web/rtc/RTCOutboundRtpStreamStats.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
package web.rtc
44

5+
import js.core.JsDouble
56
import js.core.JsLong
67
import js.core.JsString
78
import js.objects.JsPlainObject
@@ -25,7 +26,7 @@ external interface RTCOutboundRtpStreamStats :
2526
val nackCount: Int?
2627
val pliCount: Int?
2728
val qpSum: JsLong?
28-
val qualityLimitationDurations: ReadonlyRecord<JsString, Double>?
29+
val qualityLimitationDurations: ReadonlyRecord<JsString, JsDouble>?
2930
val qualityLimitationReason: RTCQualityLimitationReason?
3031
val qualityLimitationResolutionChanges: Int?
3132
val remoteId: String?

kotlin-browser/src/commonMain/generated/web/vibration/VibratePattern.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
package web.vibration
44

55
import js.array.ReadonlyArray
6+
import js.core.JsInt
67

7-
typealias VibratePattern = ReadonlyArray<Int> /* | Int */
8+
typealias VibratePattern = ReadonlyArray<JsInt> /* | Int */

kotlin-web/src/commonMain/generated/web/performance/EventCounts.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
package web.performance
44

55
import js.collections.ReadonlyMap
6+
import js.core.JsInt
67
import web.events.EventType
78

89
sealed /* final */
910
external class EventCounts
1011
protected /* private */ constructor() :
11-
ReadonlyMap<EventType<*>, Int>
12+
ReadonlyMap<EventType<*>, JsInt>

0 commit comments

Comments
 (0)