How to work around Object is possibly 'null'.ts(2531) error in TypeScript?
问题 I have seen How to suppress "error TS2533: Object is possibly 'null' or 'undefined'"?. And other things. This is not a duplicate! There are like 3 different ways to suppress this error. I do not want what. I do not want to disable strict null types either. I want a proper solution to code this properly. Can I create a new type that is the same as HTMLElement and Element just without null? What will happen at run-time if they are actually null and I just suppress the warning in TS. It feels