coderaiser / putout

🐊 Pluggable and configurable JavaScript Linter, code transformer and formatter, drop-in ESLint superpower replacement 💪 with built-in support for js, jsx, typescript, flow, markdown, yaml and json. Write declarative codemods in a simplest possible way 😏
https://putout.cloudcmd.io/
MIT License
698 stars 40 forks source link

[typescript/convert-generic-to-shorthand]: Fixes an Array of Functions incorrectly. #170

Closed ElPrudi closed 1 year ago

ElPrudi commented 1 year ago

This rules fixes this array:

const x: Array<(x: number) => x> = []

in correctly to this:

const x: (x: number) => x[] = []

But it should actually fix to this:

const x: ((x: number) => x)[]
coderaiser commented 1 year ago

Thanks! Just fixed 🎉 ! Is it works for you?

ElPrudi commented 1 year ago

It works now. Thank you very much :)