We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://flowtype.org/try/#0PQKgBAAgZgNg9gdzCYAoVUCuA7AxgFwEs5swAHOAZ3wApMAnGALjGvsOwHMAaMOMoiUosASgFMAjpjHUA8gOLZKASjABvVGDD0x+BqSi7cACzqNeagLa7jcACYsA5AAVZAZQAqj3gDo--QSUAX2VUINQgA
I'm trying to supply a default {method: 'POST'} option to whatwg-fetch -
{method: 'POST'}
/* @flow */ function post(url: string, options: RequestOptions) { return fetch(url, {method: 'POST', ...options}) }
3: return fetch(url, {method: 'POST', ...options}) ^ string. This type is incompatible with /static/flowlib/bom.js:641: method?: ?MethodType; ^ null
A workaround is casting the 'POST' string with ('POST': ?MethodType), but it seems like this ought to work without, no?
('POST': ?MethodType)
The text was updated successfully, but these errors were encountered:
Hmm, looks like a spread issue.
Sorry, something went wrong.
I think this fixes the issue: #7298
I came up with a minimal repro based on this bug report, and this is fixed in master.
No branches or pull requests
https://flowtype.org/try/#0PQKgBAAgZgNg9gdzCYAoVUCuA7AxgFwEs5swAHOAZ3wApMAnGALjGvsOwHMAaMOMoiUosASgFMAjpjHUA8gOLZKASjABvVGDD0x+BqSi7cACzqNeagLa7jcACYsA5AAVZAZQAqj3gDo--QSUAX2VUINQgA
I'm trying to supply a default
{method: 'POST'}
option to whatwg-fetch -A workaround is casting the 'POST' string with
('POST': ?MethodType)
, but it seems like this ought to work without, no?The text was updated successfully, but these errors were encountered: