Skip to content

Conversation

@tom-sherman
Copy link
Contributor

@tom-sherman tom-sherman commented Dec 21, 2021

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 either None 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

@tom-sherman
Copy link
Contributor Author

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!

@tom-sherman
Copy link
Contributor Author

Can't mark as WIP so closing for now.

@TheSpyder
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants