You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 7, 2023. It is now read-only.
The unioned type introduced by PR #18 does not allow re-assignment of properties. Consider the following snippet:
// this assignment works just fineletinit: RequestInit={cf: {cacheKey: 'foo',},}if(init.cf){// but re-writing properties is prevented by the type checkerinit.cf.cacheKey='bar'}
This produces the following type error:
The ideal outcome (if possible) would be to extend the RequestInit that fetch uses without obstructing the use case above while still supporting the example identified in issue #15.
Still trying to work out how to do this or if it's possible, but wanted to start a discussion around it :)
The text was updated successfully, but these errors were encountered:
third774
changed the title
Unioned cf type on Request does not allow re-assignment of properties
Unioned cf type on RequestInit does not allow re-assignment of properties
May 29, 2020
The unioned type introduced by PR #18 does not allow re-assignment of properties. Consider the following snippet:
This produces the following type error:
The ideal outcome (if possible) would be to extend the
RequestInit
thatfetch
uses without obstructing the use case above while still supporting the example identified in issue #15.Still trying to work out how to do this or if it's possible, but wanted to start a discussion around it :)
The text was updated successfully, but these errors were encountered: