eps1lon/types-react-codemod

useCallback: transform incorrect when using arrow function with single params

TIS-OMiddle opened this issue · 1 comments

input: useCallback(event => {})

current output: useCallback(event: any => {})

expect output: useCallback((event: any) => {})

It should add a brackets in this condition

This codemod relies on jscodeshift and Babel for code generation. Though it's not clear if it's a configuration mistake on our side or a bug in 3rd party dependencies. But definitely worth checking out.