@putout/plugin-remove-useless-mapping-modifiers

🐊Putout plugin adds ability to remove useless mapping modifiers

Usage no npm install needed!

<script type="module">
  import putoutPluginRemoveUselessMappingModifiers from 'https://cdn.skypack.dev/@putout/plugin-remove-useless-mapping-modifiers';
</script>

README

@putout/plugin-remove-useless-mapping-modifiers NPM version

🐊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