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

2.0.1 • Public • Published

@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

Package Sidebar

Install

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

Weekly Downloads

11,158

Version

2.0.1

License

MIT

Unpacked Size

4.45 kB

Total Files

4

Last publish

Collaborators

  • coderaiser