-
Notifications
You must be signed in to change notification settings - Fork 38
Use polymorphic variants for some Request properties #68
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module AbortController = Webapi__Fetch__AbortController | ||
|
||
/** Alias for anyone upgrading */ | ||
/* * Alias for anyone upgrading */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The lack of ReScript support for docs comments is annoying. Maybe we should just delete this comment now 🤷 and arguably the alias, too, since this will be going onto the 2.0 branch There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm happy to delete the aliases in a followup PR when all of these are merged as I don't fancy like dealing with the conflicts 😆 |
||
module FormData = Webapi__FormData | ||
type body | ||
type bodyInit | ||
|
@@ -74,29 +74,33 @@ type requestDestination = | |
| Worker | ||
| Xslt | ||
|
||
type requestMode = | ||
| Navigate | ||
| SameOrigin | ||
| NoCORS | ||
| CORS | ||
|
||
type requestCredentials = | ||
| Omit | ||
| SameOrigin | ||
| Include | ||
|
||
type requestCache = | ||
| Default | ||
| NoStore | ||
| Reload | ||
| NoCache | ||
| ForceCache | ||
| OnlyIfCached | ||
|
||
type requestRedirect = | ||
| Follow | ||
| Error | ||
| Manual | ||
type requestMode = [ | ||
| #navigate | ||
| #"same-origin" | ||
| #"no-cors" | ||
| #cors | ||
] | ||
|
||
type requestCredentials = [ | ||
| #omit | ||
| #"same-origin" | ||
| #"include" | ||
] | ||
|
||
type requestCache = [ | ||
| #default | ||
| #"no-store" | ||
| #reload | ||
| #"no-cache" | ||
| #"force-cache" | ||
| #"only-if-cached" | ||
] | ||
|
||
type requestRedirect = [ | ||
| #follow | ||
| #error | ||
| #manual | ||
] | ||
|
||
module HeadersInit: { | ||
type t = headersInit | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had no idea this
=?map
syntax was valid 🤨 this was just how it converted from the original OCaml. Looks like it's a convenient way to pass an optional function return value as an optional method argument 🤔Learn something new every day, I guess!