I'm watching an Angular issue on Github and I've ran into interesting .ts syntax, I've never seen before. I've tried to understand it and check how it works in practice, but... I don't understand.
This script was reviewed by someone from Angular team and generally accepted.
Syntax looks simple and wierd and it appears a few times in code:
const outlet = context !.outlet !;
this.deactivateRouteAndItsChildren(v, contexts !.getContext(k))
this.shouldRunGuardsAndResolvers(
curr, future, future.routeConfig !.runGuardsAndResolvers)
It looks like someone is checking if
someObj !.someProp
exists, but if it doesn't, it returns undefined.
Hmm for me it looks like it's the same as writing just someObj.someProp isn't it?
Could someone explain me whats the usage?