@putout/plugin-remove-duplicates-from-union
v1.0.2
Published
putout plugin adds ability to find and remove duplicates from union
Downloads
277
Maintainers
Readme
@putout/plugin-remove-duplicates-from-union
putout
plugin adds ability to find and remove duplicates
from union
(for typescript). Moved to @putout/plugin-typescript.
Install
npm i @putout/plugin-remove-duplicates-from-union -D
Rule
{
"rules": {
"remove-duplicates-from-union": "on"
}
}
❌ Incorrect code example
type x = boolean[]
| A
| string
| A
| string[]
| boolean[];
✅ Correct code Example
type x = boolean[]
| A
| string
| string[];
License
MIT