1.0.2 β’ Published 2 years ago
@putout/plugin-remove-useless-mapping-modifiers v1.0.2
@putout/plugin-remove-useless-mapping-modifiers
πPutout
plugin adds ability to remove useless mapping modifiers.
Moved to @putout/plugin-typescript
Install
npm i @putout/plugin-remove-useless-mapping-modifiers
Rule
{
"rules": {
"remove-useless-mapping-modifiers": "on"
}
}
β Incorrect code example
type SuperType = {
[Key in keyof Type]+?: Type[Key];
};
β Correct code Example
type SuperType = {
[Key in keyof Type]?: Type[Key];
};
License
MIT