putout plugin adds ability to apply as type asssertion according to best practices
npm i @putout/plugin-apply-as-type-assertions
Rule apply-as-type-assertions is not bundled by default, to enable add to .putout.json:
{
"rules": {
"apply-as-type-assertions": "on"
}
}const boundaryElement = <HTMLElement>e.target;const boundaryElement1 = e.target as HTMLElement;MIT