@putout/plugin-apply-as-type-assertions

1.1.3 • Public • Published

@putout/plugin-apply-as-type-assertions NPM version

🐊Putout plugin adds ability to apply as type assertion according to best practices. Moved to @putout/plugin-typescript.

Install

npm i @putout/plugin-apply-as-type-assertions

Rule

Rule apply-as-type-assertions is not bundled by default, to enable add to .putout.json:

Rule

{
    "rules": {
        "apply-as-type-assertions": "on"
    }
}

Incorrect code example

const boundaryElement = <HTMLElement>e.target;

Correct code Example

const boundaryElement1 = e.target as HTMLElement;

License

MIT

Package Sidebar

Install

npm i @putout/plugin-apply-as-type-assertions

Weekly Downloads

122

Version

1.1.3

License

MIT

Unpacked Size

4.05 kB

Total Files

4

Last publish

Collaborators

  • coderaiser