2.0.1 ā€¢ Published 2 years ago

@putout/plugin-convert-generic-to-shorthand v2.0.1

Weekly downloads
2,367
License
MIT
Repository
github
Last release
2 years ago

@putout/plugin-convert-generic-to-shorthand NPM version

šŸŠPutout plugin adds ability to convert generic to shorthand (https://stackoverflow.com/a/36843084/4536327). Moved to @putout/plugin-typescript.

Install

npm i @putout/plugin-convert-generic-to-shorthand -D

Rule

Rule convert-generic-to-shorthand is enabled by default for ts and tsx files.

{
    "rules": {
        "convert-generic-to-shorthand": "on"
    }
}

āŒ Incorrect code example

interface A {
    x: Array<X>;
    y: Array<Y>;
}

āœ… Correct code Example

interface A {
    x: X[];
    y: Y[];
}

License

MIT