1.0.2 • Published 2 years ago

@putout/plugin-remove-duplicates-from-union v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@putout/plugin-remove-duplicates-from-union NPM version

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