@putout/plugin-remove-useless-typeof
The
typeof
operator returns a string indicating the type of the unevaluated operand.(c) MDN
@putout/plugin-types
.
Install
npm i @putout/plugin-remove-useless-typeof
Rule
{
"rules": {
"remove-useless-typeof": "on"
}
}
❌ Example of incorrect code
typeof typeof 'hello';
✅ Example of correct code
typeof 'hello';
License
MIT