Skip to content

Commit d0ef860

Browse files
committed
prePR commit
1 parent 6b375a9 commit d0ef860

File tree

5 files changed

+7
-2
lines changed

5 files changed

+7
-2
lines changed

api-reports/2_12.txt

+1
Original file line numberDiff line numberDiff line change
@@ -26930,6 +26930,7 @@ intl/NumberFormatOptions[SO] def apply(localeMatcher: js.UndefOr[String]?, style
2693026930
package[SO] type AlgorithmIdentifier = Algorithm | String
2693126931
package[SO] type BigInteger = js.typedarray.Uint8Array
2693226932
package[SO] type BodyInit = Blob | BufferSource | FormData | String | ReadableStream[Uint8Array] | URLSearchParams
26933+
package[SO] type BlobPart = BufferSource | Blob | String
2693326934
package[SO] type BufferSource = ArrayBufferView | ArrayBuffer
2693426935
package[SO] type ByteString = String
2693526936
package[SO] type ClientRect = DOMRect (@deprecated in 2.0.0)

api-reports/2_13.txt

+1
Original file line numberDiff line numberDiff line change
@@ -26930,6 +26930,7 @@ intl/NumberFormatOptions[SO] def apply(localeMatcher: js.UndefOr[String]?, style
2693026930
package[SO] type AlgorithmIdentifier = Algorithm | String
2693126931
package[SO] type BigInteger = js.typedarray.Uint8Array
2693226932
package[SO] type BodyInit = Blob | BufferSource | FormData | String | ReadableStream[Uint8Array] | URLSearchParams
26933+
package[SO] type BlobPart = BufferSource | Blob | String
2693326934
package[SO] type BufferSource = ArrayBufferView | ArrayBuffer
2693426935
package[SO] type ByteString = String
2693526936
package[SO] type ClientRect = DOMRect (@deprecated in 2.0.0)

dom/src/main/scala/org/scalajs/dom/Blob.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import scala.scalajs.js.typedarray.{ArrayBuffer, Uint8Array}
2323
*/
2424
@js.native
2525
@JSGlobal
26-
class Blob(blobParts: js.Array[js.Any] = js.native, options: BlobPropertyBag = js.native) extends js.Object {
26+
class Blob(blobParts: js.Iterable[BlobPart], options: BlobPropertyBag = js.native) extends js.Object {
2727

2828
@deprecated("This method seems to have been added in error and not actually exist.", "1.2.0")
2929
def close(): Unit = js.native

dom/src/main/scala/org/scalajs/dom/File.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import scala.scalajs.js.annotation._
1919
*/
2020
@js.native
2121
@JSGlobal
22-
class File(bits: js.Iterable[Any], name: String, options: FilePropertyBag) extends Blob {
22+
class File(bits: js.Iterable[BlobPart], name: String, options: FilePropertyBag = js.native)
23+
extends Blob(bits, options) {
2324

2425
/** The File.lastModified read-only property provides the last modified date of the file as the number of milliseconds
2526
* since the Unix epoch (January 1, 1970 at midnight). Files without a known last modified date return the current

dom/src/main/scala/org/scalajs/dom/package.scala

+2
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,6 @@ package object dom {
112112
@js.native
113113
@JSGlobal("crypto")
114114
val webcrypto: Crypto = js.native
115+
116+
type BlobPart = BufferSource | Blob | String
115117
}

0 commit comments

Comments
 (0)