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
22: data = objectAssign({}, htmlFrontMatter(html), { body: html })
^^^^^^^^^^^^^^^^^^^^^ function call
22: data = objectAssign({}, htmlFrontMatter(html), { body: html })
^^^^ Buffer. This type is incompatible with
2: declare var exports: (input: string) => {};
^^^^^^ string. See lib: interfaces/html-frontmatter.js:2
and running flow suggest for the file resolves Buffer, as well.
Overloads are tried in order and the first one to match wins. Since extra params are also allowed, that first one will match and the second one won't. :/
I think reversing the order of the overloads in lib/node.js will help. I can try it when I get into the office.
https://github.com/facebook/flow/blob/master/lib/node.js#L634 shows fs.readFileSync correctly returning type string when an encoding is passed.
Given this declaration:
and this implementation:
Flow check raises this error
and running flow suggest for the file resolves Buffer, as well.
Are overloads working correctly?
Node 6.2.0
Flow 0.26
The text was updated successfully, but these errors were encountered: