Closed tom-sherman closed 2 years ago
I've just realised that omitting the #""
variant is incorrect as this is a valid referrerPolicy
when reading from a Request instance. I'm going to revert the commit where I removed it and mark this PR as WIP as it's blocked by the rescript formatting bug.
Would be great if anyone knew of an alternative solution!
Can't mark as WIP so closing for now.
I'm surprised you don't have access to swap a PR to be a draft PR. I hope we are able to do this one day, I hate having None
as a defined constructor anywhere because it can shadow option constructors if open
is used incorrectly.
Relates to #30 and #38
This introduces a minor (IMO) inconsistency with the JS api. In JS-land you can pass
referrerPolicy: ""
, with this PR you must pass eitherNone
or omit it.I did initially have
#""
as one of the variants but it surfaced a bug in rescript formatting. See https://github.com/rescript-lang/rescript-compiler/issues/5346