Skip to content

Commit

Permalink
Update declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
turansky committed Dec 18, 2024
1 parent ff094dc commit 83566cb
Show file tree
Hide file tree
Showing 148 changed files with 367 additions and 367 deletions.
2 changes: 1 addition & 1 deletion browser-kotlin/src/jsMain/kotlin/web/assembly/Memory.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ open external class Memory(
/**
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Memory/grow)
*/
fun grow(delta: Int): Int
fun grow(delta: UInt): UInt
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import js.objects.JsPlainObject

@JsPlainObject
external interface MemoryDescriptor {
val initial: Int
val maximum: Int?
val initial: UInt
val maximum: UInt?
val shared: Boolean?
}
4 changes: 2 additions & 2 deletions browser-kotlin/src/jsMain/kotlin/web/assembly/Table.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ open external class Table(
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/grow)
*/
fun grow(
delta: Int,
delta: UInt,
value: Any? = definedExternally,
): Int
): UInt

/**
* [MDN Reference](https://developer.mozilla.org/docs/WebAssembly/JavaScript_interface/Table/set)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import js.objects.JsPlainObject
@JsPlainObject
external interface TableDescriptor {
val element: TableKind
val initial: Int
val maximum: Int?
val initial: UInt
val maximum: UInt?
}
4 changes: 2 additions & 2 deletions browser-kotlin/src/jsMain/kotlin/web/audio/AnalyserNode.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ open external class AnalyserNode(
/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnalyserNode/fftSize)
*/
var fftSize: Int
var fftSize: UInt

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnalyserNode/frequencyBinCount)
*/
val frequencyBinCount: Int
val frequencyBinCount: UInt

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AnalyserNode/maxDecibels)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import js.objects.JsPlainObject
@JsPlainObject
external interface AnalyserOptions :
AudioNodeOptions {
val fftSize: Int?
val fftSize: UInt?
val maxDecibels: Double?
val minDecibels: Double?
val smoothingTimeConstant: Double?
Expand Down
12 changes: 6 additions & 6 deletions browser-kotlin/src/jsMain/kotlin/web/audio/AudioBuffer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ open external class AudioBuffer(
/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioBuffer/numberOfChannels)
*/
val numberOfChannels: Int
val numberOfChannels: UInt

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioBuffer/sampleRate)
Expand All @@ -37,21 +37,21 @@ open external class AudioBuffer(
*/
fun copyFromChannel(
destination: Float32Array<*>,
channelNumber: Int,
bufferOffset: Int = definedExternally,
channelNumber: UInt,
bufferOffset: UInt = definedExternally,
)

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioBuffer/copyToChannel)
*/
fun copyToChannel(
source: Float32Array<*>,
channelNumber: Int,
bufferOffset: Int = definedExternally,
channelNumber: UInt,
bufferOffset: UInt = definedExternally,
)

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioBuffer/getChannelData)
*/
fun getChannelData(channel: Int): Float32Array<*>
fun getChannelData(channel: UInt): Float32Array<*>
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import js.objects.JsPlainObject
@JsPlainObject
external interface AudioBufferOptions {
val length: Int
val numberOfChannels: Int?
val numberOfChannels: UInt?
val sampleRate: Float
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ private constructor() :
/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDestinationNode/maxChannelCount)
*/
val maxChannelCount: Int
val maxChannelCount: UInt
}
22 changes: 11 additions & 11 deletions browser-kotlin/src/jsMain/kotlin/web/audio/AudioNode.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ private constructor() :
/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCount)
*/
var channelCount: Int
var channelCount: UInt

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioNode/channelCountMode)
Expand All @@ -35,47 +35,47 @@ private constructor() :
/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfInputs)
*/
val numberOfInputs: Int
val numberOfInputs: UInt

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioNode/numberOfOutputs)
*/
val numberOfOutputs: Int
val numberOfOutputs: UInt

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioNode/connect)
*/
fun connect(
destinationNode: AudioNode,
output: Int = definedExternally,
input: Int = definedExternally,
output: UInt = definedExternally,
input: UInt = definedExternally,
): AudioNode

fun connect(
destinationParam: AudioParam,
output: Int = definedExternally,
output: UInt = definedExternally,
)

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioNode/disconnect)
*/
fun disconnect()
fun disconnect(output: Int)
fun disconnect(output: UInt)
fun disconnect(destinationNode: AudioNode)
fun disconnect(
destinationNode: AudioNode,
output: Int,
output: UInt,
)

fun disconnect(
destinationNode: AudioNode,
output: Int,
input: Int,
output: UInt,
input: UInt,
)

fun disconnect(destinationParam: AudioParam)
fun disconnect(
destinationParam: AudioParam,
output: Int,
output: UInt,
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import js.objects.JsPlainObject

@JsPlainObject
external interface AudioNodeOptions {
val channelCount: Int?
val channelCount: UInt?
val channelCountMode: ChannelCountMode?
val channelInterpretation: ChannelInterpretation?
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import js.objects.ReadonlyRecord
@JsPlainObject
external interface AudioWorkletNodeOptions :
AudioNodeOptions {
val numberOfInputs: Int?
val numberOfOutputs: Int?
val numberOfInputs: UInt?
val numberOfOutputs: UInt?
val outputChannelCount: ReadonlyArray<Number>?
val parameterData: ReadonlyRecord<String, Double>?
val processorOptions: Any?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ private constructor() :
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createBuffer)
*/
fun createBuffer(
numberOfChannels: Int,
length: Int,
numberOfChannels: UInt,
length: UInt,
sampleRate: Float,
): AudioBuffer

Expand All @@ -79,12 +79,12 @@ private constructor() :
/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createChannelMerger)
*/
fun createChannelMerger(numberOfInputs: Int = definedExternally): ChannelMergerNode
fun createChannelMerger(numberOfInputs: UInt = definedExternally): ChannelMergerNode

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createChannelSplitter)
*/
fun createChannelSplitter(numberOfOutputs: Int = definedExternally): ChannelSplitterNode
fun createChannelSplitter(numberOfOutputs: UInt = definedExternally): ChannelSplitterNode

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/BaseAudioContext/createConstantSource)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import js.objects.JsPlainObject
@JsPlainObject
external interface ChannelMergerOptions :
AudioNodeOptions {
val numberOfInputs: Int?
val numberOfInputs: UInt?
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import js.objects.JsPlainObject
@JsPlainObject
external interface ChannelSplitterOptions :
AudioNodeOptions {
val numberOfOutputs: Int?
val numberOfOutputs: UInt?
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ open external class OfflineAudioContext(
contextOptions: OfflineAudioContextOptions,
) : BaseAudioContext {
constructor(
numberOfChannels: Int,
length: Int,
numberOfChannels: UInt,
length: UInt,
sampleRate: Float,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ import js.objects.JsPlainObject
@JsPlainObject
external interface OfflineAudioContextOptions {
val length: Int
val numberOfChannels: Int?
val numberOfChannels: UInt?
val sampleRate: Float
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ external interface PublicKeyCredentialCreationOptions {
val extensions: AuthenticationExtensionsClientInputs?
val pubKeyCredParams: ReadonlyArray<PublicKeyCredentialParameters>
val rp: PublicKeyCredentialRpEntity
val timeout: Int?
val timeout: UInt?
val user: PublicKeyCredentialUserEntity
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ external interface PublicKeyCredentialCreationOptionsJSON {
val hints: ReadonlyArray<String>?
val pubKeyCredParams: ReadonlyArray<PublicKeyCredentialParameters>
val rp: PublicKeyCredentialRpEntity
val timeout: Int?
val timeout: UInt?
val user: PublicKeyCredentialUserEntityJSON
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ external interface PublicKeyCredentialRequestOptions {
val challenge: BufferSource
val extensions: AuthenticationExtensionsClientInputs?
val rpId: String?
val timeout: Int?
val timeout: UInt?
val userVerification: UserVerificationRequirement?
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ external interface PublicKeyCredentialRequestOptionsJSON {
val extensions: AuthenticationExtensionsClientInputsJSON?
val hints: ReadonlyArray<String>?
val rpId: String?
val timeout: Int?
val timeout: UInt?
val userVerification: String?
}
6 changes: 3 additions & 3 deletions browser-kotlin/src/jsMain/kotlin/web/codecs/AudioData.kt
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ open external class AudioData(
/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/numberOfChannels)
*/
val numberOfChannels: Int
val numberOfChannels: UInt

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/numberOfFrames)
*/
val numberOfFrames: Int
val numberOfFrames: UInt

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/sampleRate)
Expand All @@ -45,7 +45,7 @@ open external class AudioData(
/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/allocationSize)
*/
fun allocationSize(options: AudioDataCopyToOptions): Int
fun allocationSize(options: AudioDataCopyToOptions): UInt

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioData/clone)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import js.objects.JsPlainObject
@JsPlainObject
external interface AudioDataCopyToOptions {
val format: AudioSampleFormat?
val frameCount: Int?
val frameOffset: Int?
val planeIndex: Int
val frameCount: UInt?
val frameOffset: UInt?
val planeIndex: UInt
}
4 changes: 2 additions & 2 deletions browser-kotlin/src/jsMain/kotlin/web/codecs/AudioDataInit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import js.objects.JsPlainObject
external interface AudioDataInit {
val data: BufferSource
val format: AudioSampleFormat
val numberOfChannels: Int
val numberOfFrames: Int
val numberOfChannels: UInt
val numberOfFrames: UInt
val sampleRate: Float
val timestamp: JsLong
val transfer: ReadonlyArray<ArrayBuffer>?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ open external class AudioDecoder(
/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/decodeQueueSize)
*/
val decodeQueueSize: Int
val decodeQueueSize: UInt

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioDecoder/dequeue_event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ import js.objects.JsPlainObject
external interface AudioDecoderConfig {
val codec: String
val description: BufferSource?
val numberOfChannels: Int
val sampleRate: Int
val numberOfChannels: UInt
val sampleRate: UInt
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ open external class AudioEncoder(
/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/encodeQueueSize)
*/
val encodeQueueSize: Int
val encodeQueueSize: UInt

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/AudioEncoder/dequeue_event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ external interface AudioEncoderConfig {
val bitrate: JsLong?
val bitrateMode: BitrateMode?
val codec: String
val numberOfChannels: Int
val numberOfChannels: UInt
val opus: OpusEncoderConfig?
val sampleRate: Int
val sampleRate: UInt
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ open external class EncodedAudioChunk(
/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/byteLength)
*/
val byteLength: Int
val byteLength: UInt

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedAudioChunk/duration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ open external class EncodedVideoChunk(
/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/byteLength)
*/
val byteLength: Int
val byteLength: UInt

/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/EncodedVideoChunk/duration)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import js.objects.JsPlainObject
@JsPlainObject
external interface ImageDecodeOptions {
val completeFramesOnly: Boolean?
val frameIndex: Int?
val frameIndex: UInt?
}
Loading

0 comments on commit 83566cb

Please sign in to comment.