$ npm install @putout/plugin-convert-any-to-primitive
🐊Putout
plugin adds ability to convert any
to primitive.
Moved to @putout/plugin-typescript
.
npm i @putout/plugin-convert-any-to-primitive -D
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"
}
}
const x: any = 5;
const x: number = 5;
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE