Skip to content
New issue

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

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

Already on GitHub? # to your account

Fixup cf types #438

Merged
merged 2 commits into from
Mar 21, 2023
Merged

Fixup cf types #438

merged 2 commits into from
Mar 21, 2023

Conversation

mrbbot
Copy link
Contributor

@mrbbot mrbbot commented Mar 8, 2023

  • Type Request#cf based on type parameter, allowing Request construction with RequestInitCfProperties
  • Make RequestInitCfProperties and IncomingRequestCfProperties extend Record<string, unknown>, allowing incoming requests to be passed directly to fetch, and custom properties to added when making requests to service bindings
  • Make all IncomingRequestCfPropertiesGeographicInformation fields optional, making it easier to access cf geo-properties whilst still maintaining correctness

Closes #324
Closes #397

@mrbbot mrbbot force-pushed the bcoll/allow-unknown-cf-types branch from 0281949 to 763cb21 Compare March 13, 2023 19:38
@mrbbot mrbbot requested a review from penalosa March 13, 2023 20:20
@mrbbot mrbbot marked this pull request as ready for review March 13, 2023 20:20
@SupremeTechnopriest
Copy link

It may be worth adding #397 to this PR as well. That way cf types will be complete when this gets released.

mrbbot added 2 commits March 14, 2023 10:18
- Type `Request#cf` based on type parameter, allowing `Request`
  construction with `RequestInitCfProperties`
- Make `RequestInitCfProperties` and `IncomingRequestCfProperties`
  extend `Record<string, unknown>`, allowing incoming requests to be
  passed directly to fetch, and custom properties to added when
  making requests to service bindings
- Make all `IncomingRequestCfPropertiesGeographicInformation` fields
  optional, making it easier to access `cf` geo-properties whilst
  still maintaining correctness

Closes #324
@mrbbot mrbbot merged commit f9c7063 into main Mar 21, 2023
@mrbbot mrbbot deleted the bcoll/allow-unknown-cf-types branch March 21, 2023 12:20
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
3 participants