Having this Flow'ed code
export default (resource: string, init?: Object = {}) =>
I'm getting following warning
warning Unexpected use of weak type "Object" flowtype/no-weak-types
The thing is the init
argument is exactly native' fetch second argument (see MDN) which is optional and which is an object that might have more than 10 complicated properties, so I don't want to specify its type rather than generic "Object" or "any".
What is the right way to avoid this warning in my situation?