in my codebase, previously I have seen this.person?.name which is optional chaining, but I have never seen ! be used nor can I find any resource to explain it's use, can anyone shed any light on it?
It means that according to Typescript, this.person can be null or undefined, but the developer who coded this know that in this specific case, the value can't be null or undefined, so he added ! to remove the warning about nullability
this.personcan be null or undefined, but the developer who coded this know that in this specific case, the value can't be null or undefined, so he added!to remove the warning about nullability