flow
flow copied to clipboard
Self-require in spread assignment causes object type to be `any`
M.js
// @flow
const obj = { ...require('./M') };
(obj: string); // cast to whatever
(obj.x); // any prop, etc.
This is intentional. A self require is any and then spreading any will make the result any 👍