const a = {
getText() {
return 'text';
}
};
delete a.getText;
with tslint.json configuration:
{
"rules": {
"no-unbound-method": true
}
}
Error Avoid referencing unbound methods which may cause unintentional scoping of 'this'.
No error. I am deleting a property. There is no risk on deleting unbound method compared to other kind of properties.
Hi, I think I could fix this issue by adding allow-delete parameter similar to what I have done previously for typeof operator. What do you think about such solution?
@piotrgajow that sounds great, yes please! 😄
Ok, I have made PR for this change.
Fxed by #4548! ✨