1.1.3 ā¢ Published 2 years ago
@putout/plugin-apply-as-type-assertions v1.1.3
@putout/plugin-apply-as-type-assertions
š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