1.4.1 ā€¢ Published 2 years ago

@putout/plugin-remove-useless-types v1.4.1

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

@putout/plugin-remove-useless-types NPM version

šŸŠPutout plugin adds ability to find and remove useless types. Moved to @putout/plugin-typescript.

Install

npm i @putout/plugin-remove-useless-types -D

Rule

{
    "rules": {
        "remove-useless-types": "on"
    }
}

āŒ Incorrect code example

type oldType = {
    a: number,
    b: string,
};

type newType = oldType;

const x: newType = 5;

āœ… Correct code Example

type oldType = {
    a: number,
    b: string,
};

const x: oldType = 5;

License

MIT