Skip to content

Commit

Permalink
Images. Cleanup ImageBitmapSource [generated] (#2219)
Browse files Browse the repository at this point in the history
  • Loading branch information
turansky committed Mar 2, 2024
1 parent ff28ff0 commit 294288a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
3 changes: 2 additions & 1 deletion kotlin-web/src/jsMain/generated/web/blob/Blob.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import js.buffer.ArrayBuffer
import js.core.JsLong
import js.promise.Promise
import js.typedarrays.Uint8Array
import web.images.ImageBitmapSource
import web.streams.ReadableStream

/**
Expand All @@ -17,7 +18,7 @@ import web.streams.ReadableStream
open external class Blob(
blobParts: ReadonlyArray<BlobPart> = definedExternally,
options: BlobPropertyBag = definedExternally,
) {
) : ImageBitmapSource {
/**
* [MDN Reference](https://developer.mozilla.org/docs/Web/API/Blob/size)
*/
Expand Down
12 changes: 0 additions & 12 deletions kotlin-web/src/jsMain/generated/web/images/ImageBitmapSource.kt
Original file line number Diff line number Diff line change
@@ -1,23 +1,11 @@
// Automatically generated - do not modify!

@file:Suppress(
"NOTHING_TO_INLINE",
)

package web.images

import web.blob.Blob

/**
* Union of:
* - `CanvasImageSource`
* - `Blob`
* - `ImageData`
*/
external interface ImageBitmapSource

inline fun Blob.asImageBitmapSource(): ImageBitmapSource =
unsafeCast<ImageBitmapSource>()

inline fun ImageBitmapSource.asBlobOrNull(): Blob? =
asDynamic() as? Blob

0 comments on commit 294288a

Please sign in to comment.