@putout/plugin-convert-any-to-primitive

    1.0.1 • Public • Published

    @putout/plugin-convert-any-to-primitive NPM version Dependency Status

    putout plugin adds ability to convert generic to shorthand (https://stackoverflow.com/a/36843084/4536327).

    Install

    npm i @putout/plugin-convert-any-to-primitive -D
    

    Rule

    Rule convert-any-to-primitive is enabled by default for ts and tsx files, to disable add to .putout.json:

    {
        "rules": {
            "convert-any-to-primitive": "off"
        }
    }

    Incorrect code example

    const x: any = 5;

    Correct code Example

    const x: number = 5;

    License

    MIT

    Install

    npm i @putout/plugin-convert-any-to-primitive

    DownloadsWeekly Downloads

    4

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    5.15 kB

    Total Files

    4

    Last publish

    Collaborators

    • coderaiser