@putout/plugin-remove-useless-mapped-types
Putout
plugin adds ability to remove useless mapped types.
Moved to @putout/plugin-typescript
.
Install
npm i @putout/plugin-remove-useless-mapped-types
Rule
{
"rules": {
"remove-useless-mapped-types": "on"
}
}
❌ Incorrect code example
type SuperType = {
[Key in keyof Type]: Type[Key];
};
✅ Correct code Example
type SuperType = Type;
License
MIT