// change output type of withProps | |
// from `HOC<A & B, B>` to `HOC<{ ...$Exact<B>, ...A }, B>` | |
type EnhancedCompProps = { b: number } | |
const enhancer2: HOC<*, EnhancedCompProps> = compose( | |
withProps(({ b }) => ({ | |
b: `${b}`, | |
})), | |
withProps(({ b }) => ({ | |
// $ExpectError The operand of an arithmetic operation must be a number | |
c: 1 * b, | |
})) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment