[Wasm] stdlib NFC: Suppress cast warnings in org.w3c

Also fix dukat build and update copyright year in generated files.
This commit is contained in:
Svyatoslav Kuzmich
2023-01-13 18:03:08 +01:00
parent 7fed003531
commit 238da4c793
21 changed files with 131 additions and 23 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -51,6 +51,7 @@ public inline fun WebGLContextAttributes(alpha: Boolean? = true, depth: Boolean?
o["preserveDrawingBuffer"] = preserveDrawingBuffer
o["preferLowPowerToHighPerformance"] = preferLowPowerToHighPerformance
o["failIfMajorPerformanceCaveat"] = failIfMajorPerformanceCaveat
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as WebGLContextAttributes
}
@@ -899,6 +900,7 @@ public inline fun WebGLContextEventInit(statusMessage: String? = "", bubbles: Bo
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as WebGLContextEventInit
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -27,6 +27,7 @@ public inline fun ClipboardEventInit(clipboardData: DataTransfer? = null, bubble
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ClipboardEventInit
}
@@ -65,5 +66,6 @@ public external interface ClipboardPermissionDescriptor {
public inline fun ClipboardPermissionDescriptor(allowWithoutGesture: Boolean? = false): ClipboardPermissionDescriptor {
val o = js("({})")
o["allowWithoutGesture"] = allowWithoutGesture
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ClipboardPermissionDescriptor
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -51,6 +51,7 @@ public inline fun MediaKeySystemConfiguration(label: String? = "", initDataTypes
o["distinctiveIdentifier"] = distinctiveIdentifier
o["persistentState"] = persistentState
o["sessionTypes"] = sessionTypes
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MediaKeySystemConfiguration
}
@@ -69,6 +70,7 @@ public inline fun MediaKeySystemMediaCapability(contentType: String? = "", robus
val o = js("({})")
o["contentType"] = contentType
o["robustness"] = robustness
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MediaKeySystemMediaCapability
}
@@ -144,6 +146,7 @@ public inline fun MediaKeyMessageEventInit(messageType: MediaKeyMessageType?, me
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MediaKeyMessageEventInit
}
@@ -177,6 +180,7 @@ public inline fun MediaEncryptedEventInit(initDataType: String? = "", initData:
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MediaEncryptedEventInit
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -45,6 +45,7 @@ public inline fun UIEventInit(view: Window? = null, detail: Int? = 0, bubbles: B
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as UIEventInit
}
@@ -78,6 +79,7 @@ public inline fun FocusEventInit(relatedTarget: EventTarget? = null, view: Windo
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as FocusEventInit
}
@@ -171,6 +173,7 @@ public inline fun MouseEventInit(screenX: Int? = 0, screenY: Int? = 0, clientX:
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MouseEventInit
}
@@ -242,6 +245,7 @@ public inline fun EventModifierInit(ctrlKey: Boolean? = false, shiftKey: Boolean
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as EventModifierInit
}
@@ -315,6 +319,7 @@ public inline fun WheelEventInit(deltaX: Double? = 0.0, deltaY: Double? = 0.0, d
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as WheelEventInit
}
@@ -353,6 +358,7 @@ public inline fun InputEventInit(data: String? = "", isComposing: Boolean? = fal
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as InputEventInit
}
@@ -432,6 +438,7 @@ public inline fun KeyboardEventInit(key: String? = "", code: String? = "", locat
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as KeyboardEventInit
}
@@ -465,6 +472,7 @@ public inline fun CompositionEventInit(data: String? = "", view: Window? = null,
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as CompositionEventInit
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -1506,6 +1506,7 @@ public inline fun TrackEventInit(track: UnionAudioTrackOrTextTrackOrVideoTrack?
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as TrackEventInit
}
@@ -2561,6 +2562,7 @@ public inline fun RelatedEventInit(relatedTarget: EventTarget? = null, bubbles:
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as RelatedEventInit
}
@@ -2701,6 +2703,7 @@ public external interface AssignedNodesOptions {
public inline fun AssignedNodesOptions(flatten: Boolean? = false): AssignedNodesOptions {
val o = js("({})")
o["flatten"] = flatten
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as AssignedNodesOptions
}
@@ -2747,6 +2750,7 @@ public external interface CanvasRenderingContext2DSettings {
public inline fun CanvasRenderingContext2DSettings(alpha: Boolean? = true): CanvasRenderingContext2DSettings {
val o = js("({})")
o["alpha"] = alpha
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as CanvasRenderingContext2DSettings
}
@@ -2961,6 +2965,7 @@ public inline fun HitRegionOptions(path: Path2D? = null, fillRule: CanvasFillRul
o["control"] = control
o["label"] = label
o["role"] = role
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as HitRegionOptions
}
@@ -3014,6 +3019,7 @@ public external interface ImageBitmapRenderingContextSettings {
public inline fun ImageBitmapRenderingContextSettings(alpha: Boolean? = true): ImageBitmapRenderingContextSettings {
val o = js("({})")
o["alpha"] = alpha
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ImageBitmapRenderingContextSettings
}
@@ -3037,6 +3043,7 @@ public external interface ElementDefinitionOptions {
public inline fun ElementDefinitionOptions(extends: String? = undefined): ElementDefinitionOptions {
val o = js("({})")
o["extends"] = extends
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ElementDefinitionOptions
}
@@ -3137,6 +3144,7 @@ public inline fun DragEventInit(dataTransfer: DataTransfer? = null, screenX: Int
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as DragEventInit
}
@@ -3278,6 +3286,7 @@ public inline fun PopStateEventInit(state: Any? = null, bubbles: Boolean? = fals
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as PopStateEventInit
}
@@ -3314,6 +3323,7 @@ public inline fun HashChangeEventInit(oldURL: String? = "", newURL: String? = ""
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as HashChangeEventInit
}
@@ -3345,6 +3355,7 @@ public inline fun PageTransitionEventInit(persisted: Boolean? = false, bubbles:
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as PageTransitionEventInit
}
@@ -3441,6 +3452,7 @@ public inline fun ErrorEventInit(message: String? = "", filename: String? = "",
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ErrorEventInit
}
@@ -3475,6 +3487,7 @@ public inline fun PromiseRejectionEventInit(promise: Promise<Any?>?, reason: Any
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as PromiseRejectionEventInit
}
@@ -3939,6 +3952,7 @@ public inline fun ImageBitmapOptions(imageOrientation: ImageOrientation? = Image
o["resizeWidth"] = resizeWidth
o["resizeHeight"] = resizeHeight
o["resizeQuality"] = resizeQuality
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ImageBitmapOptions
}
@@ -3991,6 +4005,7 @@ public inline fun MessageEventInit(data: Any? = null, origin: String? = "", last
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MessageEventInit
}
@@ -4024,6 +4039,7 @@ public external interface EventSourceInit {
public inline fun EventSourceInit(withCredentials: Boolean? = false): EventSourceInit {
val o = js("({})")
o["withCredentials"] = withCredentials
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as EventSourceInit
}
@@ -4093,6 +4109,7 @@ public inline fun CloseEventInit(wasClean: Boolean? = false, code: Short? = 0, r
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as CloseEventInit
}
@@ -4193,6 +4210,7 @@ public inline fun WorkerOptions(type: WorkerType? = WorkerType.CLASSIC, credenti
val o = js("({})")
o["type"] = type
o["credentials"] = credentials
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as WorkerOptions
}
@@ -4315,6 +4333,7 @@ public inline fun StorageEventInit(key: String? = null, oldValue: String? = null
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as StorageEventInit
}
@@ -4538,6 +4557,7 @@ public inline fun EventInit(bubbles: Boolean? = false, cancelable: Boolean? = fa
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as EventInit
}
@@ -4570,6 +4590,7 @@ public inline fun CustomEventInit(detail: Any? = null, bubbles: Boolean? = false
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as CustomEventInit
}
@@ -4584,6 +4605,7 @@ public external interface EventListenerOptions {
public inline fun EventListenerOptions(capture: Boolean? = false): EventListenerOptions {
val o = js("({})")
o["capture"] = capture
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as EventListenerOptions
}
@@ -4603,6 +4625,7 @@ public inline fun AddEventListenerOptions(passive: Boolean? = false, once: Boole
o["passive"] = passive
o["once"] = once
o["capture"] = capture
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as AddEventListenerOptions
}
@@ -4736,6 +4759,7 @@ public inline fun MutationObserverInit(childList: Boolean? = false, attributes:
o["attributeOldValue"] = attributeOldValue
o["characterDataOldValue"] = characterDataOldValue
o["attributeFilter"] = attributeFilter
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MutationObserverInit
}
@@ -4821,6 +4845,7 @@ public external interface GetRootNodeOptions {
public inline fun GetRootNodeOptions(composed: Boolean? = false): GetRootNodeOptions {
val o = js("({})")
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as GetRootNodeOptions
}
@@ -5069,6 +5094,7 @@ public external interface ElementCreationOptions {
public inline fun ElementCreationOptions(param_is: String? = undefined): ElementCreationOptions {
val o = js("({})")
o["is"] = param_is
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ElementCreationOptions
}
@@ -5273,6 +5299,7 @@ public external interface ShadowRootInit {
public inline fun ShadowRootInit(mode: ShadowRootMode?): ShadowRootInit {
val o = js("({})")
o["mode"] = mode
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ShadowRootInit
}
@@ -5659,6 +5686,7 @@ public inline fun DOMPointInit(x: Double? = 0.0, y: Double? = 0.0, z: Double? =
o["y"] = y
o["z"] = z
o["w"] = w
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as DOMPointInit
}
@@ -5709,6 +5737,7 @@ public inline fun DOMRectInit(x: Double? = 0.0, y: Double? = 0.0, width: Double?
o["y"] = y
o["width"] = width
o["height"] = height
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as DOMRectInit
}
@@ -5836,6 +5865,7 @@ public external interface ScrollOptions {
public inline fun ScrollOptions(behavior: ScrollBehavior? = ScrollBehavior.AUTO): ScrollOptions {
val o = js("({})")
o["behavior"] = behavior
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ScrollOptions
}
@@ -5858,6 +5888,7 @@ public inline fun ScrollToOptions(left: Double? = undefined, top: Double? = unde
o["left"] = left
o["top"] = top
o["behavior"] = behavior
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ScrollToOptions
}
@@ -5907,6 +5938,7 @@ public inline fun MediaQueryListEventInit(media: String? = "", matches: Boolean?
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MediaQueryListEventInit
}
@@ -5947,6 +5979,7 @@ public inline fun ScrollIntoViewOptions(block: ScrollLogicalPosition? = ScrollLo
o["block"] = block
o["inline"] = inline
o["behavior"] = behavior
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ScrollIntoViewOptions
}
@@ -5965,6 +5998,7 @@ public inline fun BoxQuadOptions(box: CSSBoxType? = CSSBoxType.BORDER, relativeT
val o = js("({})")
o["box"] = box
o["relativeTo"] = relativeTo
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as BoxQuadOptions
}
@@ -5983,6 +6017,7 @@ public inline fun ConvertCoordinateOptions(fromBox: CSSBoxType? = CSSBoxType.BOR
val o = js("({})")
o["fromBox"] = fromBox
o["toBox"] = toBox
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ConvertCoordinateOptions
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -128,6 +128,7 @@ public inline fun MediaTrackSupportedConstraints(width: Boolean? = true, height:
o["channelCount"] = channelCount
o["deviceId"] = deviceId
o["groupId"] = groupId
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MediaTrackSupportedConstraints
}
@@ -202,6 +203,7 @@ public inline fun MediaTrackCapabilities(width: ULongRange? = undefined, height:
o["channelCount"] = channelCount
o["deviceId"] = deviceId
o["groupId"] = groupId
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MediaTrackCapabilities
}
@@ -235,6 +237,7 @@ public inline fun MediaTrackConstraints(advanced: Array<MediaTrackConstraintSet>
o["channelCount"] = channelCount
o["deviceId"] = deviceId
o["groupId"] = groupId
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MediaTrackConstraints
}
@@ -309,6 +312,7 @@ public inline fun MediaTrackConstraintSet(width: Dynamic? = undefined, height: D
o["channelCount"] = channelCount
o["deviceId"] = deviceId
o["groupId"] = groupId
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MediaTrackConstraintSet
}
@@ -386,6 +390,7 @@ public inline fun MediaTrackSettings(width: Int? = undefined, height: Int? = und
o["channelCount"] = channelCount
o["deviceId"] = deviceId
o["groupId"] = groupId
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MediaTrackSettings
}
@@ -415,6 +420,7 @@ public inline fun MediaStreamTrackEventInit(track: MediaStreamTrack?, bubbles: B
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MediaStreamTrackEventInit
}
@@ -443,6 +449,7 @@ public inline fun OverconstrainedErrorEventInit(error: Dynamic? = null.unsafeCas
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as OverconstrainedErrorEventInit
}
@@ -489,6 +496,7 @@ public inline fun MediaStreamConstraints(video: Dynamic? = false.unsafeCast<Dyna
val o = js("({})")
o["video"] = video
o["audio"] = audio
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as MediaStreamConstraints
}
@@ -520,6 +528,7 @@ public inline fun DoubleRange(max: Double? = undefined, min: Double? = undefined
val o = js("({})")
o["max"] = max
o["min"] = min
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as DoubleRange
}
@@ -540,6 +549,7 @@ public inline fun ConstrainDoubleRange(exact: Double? = undefined, ideal: Double
o["ideal"] = ideal
o["max"] = max
o["min"] = min
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ConstrainDoubleRange
}
@@ -558,6 +568,7 @@ public inline fun ULongRange(max: Int? = undefined, min: Int? = undefined): ULon
val o = js("({})")
o["max"] = max
o["min"] = min
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ULongRange
}
@@ -578,6 +589,7 @@ public inline fun ConstrainULongRange(exact: Int? = undefined, ideal: Int? = und
o["ideal"] = ideal
o["max"] = max
o["min"] = min
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ConstrainULongRange
}
@@ -599,6 +611,7 @@ public inline fun ConstrainBooleanParameters(exact: Boolean? = undefined, ideal:
val o = js("({})")
o["exact"] = exact
o["ideal"] = ideal
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ConstrainBooleanParameters
}
@@ -620,6 +633,7 @@ public inline fun ConstrainDOMStringParameters(exact: Dynamic? = undefined, idea
val o = js("({})")
o["exact"] = exact
o["ideal"] = ideal
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ConstrainDOMStringParameters
}
@@ -629,6 +643,7 @@ public external interface Capabilities
@kotlin.internal.InlineOnly
public inline fun Capabilities(): Capabilities {
val o = js("({})")
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as Capabilities
}
@@ -638,6 +653,7 @@ public external interface Settings
@kotlin.internal.InlineOnly
public inline fun Settings(): Settings {
val o = js("({})")
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as Settings
}
@@ -647,6 +663,7 @@ public external interface ConstraintSet
@kotlin.internal.InlineOnly
public inline fun ConstraintSet(): ConstraintSet {
val o = js("({})")
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ConstraintSet
}
@@ -661,6 +678,7 @@ public external interface Constraints : ConstraintSet {
public inline fun Constraints(advanced: Array<ConstraintSet>? = undefined): Constraints {
val o = js("({})")
o["advanced"] = advanced
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as Constraints
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -87,6 +87,7 @@ public inline fun PointerEventInit(pointerId: Int? = 0, width: Double? = 1.0, he
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as PointerEventInit
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -69,6 +69,7 @@ public inline fun SVGBoundingBoxOptions(fill: Boolean? = true, stroke: Boolean?
o["stroke"] = stroke
o["markers"] = markers
o["clipped"] = clipped
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as SVGBoundingBoxOptions
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -117,6 +117,7 @@ public inline fun RequestInit(method: String? = undefined, headers: Dynamic? = u
o["integrity"] = integrity
o["keepalive"] = keepalive
o["window"] = window
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as RequestInit
}
@@ -166,6 +167,7 @@ public inline fun ResponseInit(status: Short? = 200, statusText: String? = "OK",
o["status"] = status
o["statusText"] = statusText
o["headers"] = headers
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ResponseInit
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -36,6 +36,7 @@ public external interface BlobPropertyBag {
public inline fun BlobPropertyBag(type: String? = ""): BlobPropertyBag {
val o = js("({})")
o["type"] = type
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as BlobPropertyBag
}
@@ -59,6 +60,7 @@ public inline fun FilePropertyBag(lastModified: Int? = undefined, type: String?
val o = js("({})")
o["lastModified"] = lastModified
o["type"] = type
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as FilePropertyBag
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -121,6 +121,7 @@ public inline fun NotificationOptions(dir: NotificationDirection? = Notification
o["sticky"] = sticky
o["data"] = data
o["actions"] = actions
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as NotificationOptions
}
@@ -139,6 +140,7 @@ public inline fun NotificationAction(action: String?, title: String?, icon: Stri
o["action"] = action
o["title"] = title
o["icon"] = icon
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as NotificationAction
}
@@ -153,6 +155,7 @@ public external interface GetNotificationOptions {
public inline fun GetNotificationOptions(tag: String? = ""): GetNotificationOptions {
val o = js("({})")
o["tag"] = tag
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as GetNotificationOptions
}
@@ -187,6 +190,7 @@ public inline fun NotificationEventInit(notification: Notification?, action: Str
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as NotificationEventInit
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -71,6 +71,7 @@ public inline fun RegistrationOptions(scope: String? = undefined, type: WorkerTy
val o = js("({})")
o["scope"] = scope
o["type"] = type
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as RegistrationOptions
}
@@ -122,6 +123,7 @@ public inline fun ServiceWorkerMessageEventInit(data: Any? = undefined, origin:
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ServiceWorkerMessageEventInit
}
@@ -187,6 +189,7 @@ public inline fun ClientQueryOptions(includeUncontrolled: Boolean? = false, type
val o = js("({})")
o["includeUncontrolled"] = includeUncontrolled
o["type"] = type
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ClientQueryOptions
}
@@ -213,6 +216,7 @@ public inline fun ExtendableEventInit(bubbles: Boolean? = false, cancelable: Boo
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ExtendableEventInit
}
@@ -241,6 +245,7 @@ public inline fun ForeignFetchOptions(scopes: Array<String>?, origins: Array<Str
val o = js("({})")
o["scopes"] = scopes
o["origins"] = origins
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ForeignFetchOptions
}
@@ -281,6 +286,7 @@ public inline fun FetchEventInit(request: Request?, clientId: String? = null, is
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as FetchEventInit
}
@@ -313,6 +319,7 @@ public inline fun ForeignFetchEventInit(request: Request?, origin: String? = "nu
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ForeignFetchEventInit
}
@@ -333,6 +340,7 @@ public inline fun ForeignFetchResponse(response: Response?, origin: String? = un
o["response"] = response
o["origin"] = origin
o["headers"] = headers
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ForeignFetchResponse
}
@@ -384,6 +392,7 @@ public inline fun ExtendableMessageEventInit(data: Any? = undefined, origin: Str
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ExtendableMessageEventInit
}
@@ -423,6 +432,7 @@ public inline fun CacheQueryOptions(ignoreSearch: Boolean? = false, ignoreMethod
o["ignoreMethod"] = ignoreMethod
o["ignoreVary"] = ignoreVary
o["cacheName"] = cacheName
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as CacheQueryOptions
}
@@ -449,6 +459,7 @@ public inline fun CacheBatchOperation(type: String? = undefined, request: Reques
o["request"] = request
o["response"] = response
o["options"] = options
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as CacheBatchOperation
}
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
@@ -115,6 +115,7 @@ public inline fun ProgressEventInit(lengthComputable: Boolean? = false, loaded:
o["bubbles"] = bubbles
o["cancelable"] = cancelable
o["composed"] = composed
@Suppress("UNCHECKED_CAST_TO_EXTERNAL_INTERFACE")
return o as ProgressEventInit
}
+3 -3
View File
@@ -15,13 +15,13 @@ dependencies {
task("downloadIDL", JavaExec::class) {
main = "org.jetbrains.kotlin.tools.dukat.DownloadKt"
classpath = sourceSets["main"].runtimeClasspath
dependsOn(":dukat:build")
dependsOn("build")
}
task("generateStdlibFromIDL", JavaExec::class) {
main = "org.jetbrains.kotlin.tools.dukat.LaunchJsKt"
classpath = sourceSets["main"].runtimeClasspath
dependsOn(":dukat:build")
dependsOn("build")
systemProperty("line.separator", "\n")
}
@@ -30,6 +30,6 @@ task("generateStdlibFromIDL", JavaExec::class) {
task("generateWasmStdlibFromIDL", JavaExec::class) {
main = "org.jetbrains.kotlin.tools.dukat.LaunchWasmKt"
classpath = sourceSets["main"].runtimeClasspath
dependsOn(":dukat:build")
dependsOn("build")
systemProperty("line.separator", "\n")
}
@@ -5,10 +5,27 @@
package org.jetbrains.kotlin.tools.dukat
import java.io.File
import kotlin.text.Regex
fun main() {
val outputDirectory = "../../stdlib/wasm/src/org.w3c/"
launch(
outputDirectory = "../../stdlib/wasm/src/org.w3c/",
outputDirectory = outputDirectory,
dynamicAsType = true,
useStaticGetters = true
)
File(outputDirectory).walk().forEach {
if (it.isFile && it.name.endsWith(".kt")) {
it.writeText(postProcessIdlBindings(it.readText()))
}
}
}
fun postProcessIdlBindings(source: String): String {
return source
.replace(
Regex("( {4}return o as \\w+)"),
" @Suppress(\"UNCHECKED_CAST_TO_EXTERNAL_INTERFACE\")\n\$1"
)
}