Skip to content
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

Add URLSearchParams to BodyInit #722

Merged
merged 2 commits into from
Aug 21, 2022
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
2 changes: 1 addition & 1 deletion api-reports/2_12.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26797,7 +26797,7 @@ intl/NumberFormatOptions[JT] var useGrouping: js.UndefOr[Boolean]
intl/NumberFormatOptions[SO] def apply(localeMatcher: js.UndefOr[String]?, style: js.UndefOr[String]?, currency: js.UndefOr[String]?, currencyDisplay: js.UndefOr[String]?, useGrouping: js.UndefOr[Boolean]?, minimumIntegerDigits: js.UndefOr[Double]?, minimumFractionDigits: js.UndefOr[Double]?, maximumFractionDigits: js.UndefOr[Double]?, minimumSignificantDigits: js.UndefOr[Double]?, maximumSignificantDigits: js.UndefOr[Double]?): NumberFormatOptions (@deprecated in 2.0.0)
package[SO] type AlgorithmIdentifier = Algorithm | String
package[SO] type BigInteger = js.typedarray.Uint8Array
package[SO] type BodyInit = Blob | BufferSource | FormData | String | ReadableStream[Uint8Array]
package[SO] type BodyInit = Blob | BufferSource | FormData | String | ReadableStream[Uint8Array] | URLSearchParams
package[SO] type BufferSource = ArrayBufferView | ArrayBuffer
package[SO] type ByteString = String
package[SO] type ClientRect = DOMRect (@deprecated in 2.0.0)
Expand Down
2 changes: 1 addition & 1 deletion api-reports/2_13.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26797,7 +26797,7 @@ intl/NumberFormatOptions[JT] var useGrouping: js.UndefOr[Boolean]
intl/NumberFormatOptions[SO] def apply(localeMatcher: js.UndefOr[String]?, style: js.UndefOr[String]?, currency: js.UndefOr[String]?, currencyDisplay: js.UndefOr[String]?, useGrouping: js.UndefOr[Boolean]?, minimumIntegerDigits: js.UndefOr[Double]?, minimumFractionDigits: js.UndefOr[Double]?, maximumFractionDigits: js.UndefOr[Double]?, minimumSignificantDigits: js.UndefOr[Double]?, maximumSignificantDigits: js.UndefOr[Double]?): NumberFormatOptions (@deprecated in 2.0.0)
package[SO] type AlgorithmIdentifier = Algorithm | String
package[SO] type BigInteger = js.typedarray.Uint8Array
package[SO] type BodyInit = Blob | BufferSource | FormData | String | ReadableStream[Uint8Array]
package[SO] type BodyInit = Blob | BufferSource | FormData | String | ReadableStream[Uint8Array] | URLSearchParams
package[SO] type BufferSource = ArrayBufferView | ArrayBuffer
package[SO] type ByteString = String
package[SO] type ClientRect = DOMRect (@deprecated in 2.0.0)
Expand Down
4 changes: 2 additions & 2 deletions dom/src/main/scala/org/scalajs/dom/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ package object dom {
/** This type should capture strings consisting only of ASCII chars todo: is there a way to capture this type? */
type ByteString = String

/** defined at [[https://fetch.spec.whatwg.org/#body-mixin ¶6.2 Body mixin]] in whatwg Fetch spec */
/** defined at [[https://fetch.spec.whatwg.org/#bodyinit-unions]] in whatwg Fetch spec */
type BodyInit =
Blob | BufferSource | FormData | String | ReadableStream[Uint8Array] // todo: add URLSearchParams
Blob | BufferSource | FormData | String | ReadableStream[Uint8Array] | URLSearchParams

/** WebIDL sequence<T> is js.Array[T] | JSIterable[T]. However @mseddon knows at least Blink's IDL compiler treats
* these as simply js.Array[T] for now. We keep this type as a reminder to check in more detail
Expand Down