@putout/plugin-remove-useless-types-from-constants
putout plugin adds ability to convert any to primitive type
Last updated 4 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @putout/plugin-remove-useless-types-from-constants 
SYNC missed versions from official npm registry.

@putout/plugin-remove-useless-types-from-constants NPM version Dependency Status

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

Install

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

Rule

Rule remove-useless-types-from-constants is enabled by default for ts and tsx files, to disable add to .putout.json:

{
    "rules": {
        "remove-useless-types-from-constants": "off"
    }
}

❌ Incorrect code example

const x: any = 5;

✅ Correct code Example

const x = 5;

License

MIT

Current Tags

  • 1.2.1                                ...           latest (4 years ago)

5 Versions

  • 1.2.1                                ...           4 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (6)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |