$ cnpm install @putout/plugin-convert-generic-to-shorthand
putout plugin adds ability to convert generic to shorthand (https://stackoverflow.com/a/36843084/4536327).
npm i @putout/plugin-convert-generic-to-shorthand -D
Rule convert-generic-to-shorthand is enabled by default for ts and tsx files.
{
"rules": {
"convert-generic-to-shorthand": "on"
}
}
interface A {
x: Array<X>;
y: Array<Y>;
}
interface A {
x: X[];
y: Y[];
}
MIT
Copyright 2013 - present © cnpmjs.org | Home |