Skip to content

Fix #515 Blob.stream() emits Uint8Array #551

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api-reports/2_12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ Blob[JC] def arrayBuffer(): js.Promise[ArrayBuffer]
Blob[JC] def close(): Unit (@deprecated in 1.2.0)
Blob[JC] def size: Double
Blob[JC] def slice(start: Double?, end: Double?, contentType: String?): Blob
Blob[JC] def stream(): ReadableStream[Byte]
Blob[JC] def stream(): ReadableStream[Uint8Array]
Blob[JC] def text(): js.Promise[String]
Blob[JC] def `type`: String
Blob[JO]
Expand Down Expand Up @@ -1601,7 +1601,7 @@ File[JC] def close(): Unit (@deprecated in 1.2.0)
File[JC] def name: String
File[JC] def size: Double
File[JC] def slice(start: Double?, end: Double?, contentType: String?): Blob
File[JC] def stream(): ReadableStream[Byte]
File[JC] def stream(): ReadableStream[Uint8Array]
File[JC] def text(): js.Promise[String]
File[JC] def `type`: String
FileList[JC] @JSBracketAccess def apply(index: Int): T
Expand Down
4 changes: 2 additions & 2 deletions api-reports/2_13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ Blob[JC] def arrayBuffer(): js.Promise[ArrayBuffer]
Blob[JC] def close(): Unit (@deprecated in 1.2.0)
Blob[JC] def size: Double
Blob[JC] def slice(start: Double?, end: Double?, contentType: String?): Blob
Blob[JC] def stream(): ReadableStream[Byte]
Blob[JC] def stream(): ReadableStream[Uint8Array]
Blob[JC] def text(): js.Promise[String]
Blob[JC] def `type`: String
Blob[JO]
Expand Down Expand Up @@ -1601,7 +1601,7 @@ File[JC] def close(): Unit (@deprecated in 1.2.0)
File[JC] def name: String
File[JC] def size: Double
File[JC] def slice(start: Double?, end: Double?, contentType: String?): Blob
File[JC] def stream(): ReadableStream[Byte]
File[JC] def stream(): ReadableStream[Uint8Array]
File[JC] def text(): js.Promise[String]
File[JC] def `type`: String
FileList[JC] @JSBracketAccess def apply(index: Int): T
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/org/scalajs/dom/lib.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import scala.collection.mutable
import scala.language.implicitConversions
import scala.scalajs.js
import scala.scalajs.js.annotation._
import scala.scalajs.js.typedarray.ArrayBuffer
import scala.scalajs.js.typedarray.{ArrayBuffer, Uint8Array}
import scala.scalajs.js.|

@js.native
Expand Down Expand Up @@ -6617,7 +6617,7 @@ class Blob(blobParts: js.Array[js.Any] = js.native, options: BlobPropertyBag = j
*
* MDN
*/
def stream(): ReadableStream[Byte] = js.native
def stream(): ReadableStream[Uint8Array] = js.native

/** Returns a promise that resolves with a USVString containing the entire contents of the blob interpreted as UTF-8
* text.
Expand Down