Below code type narrowing seems not working in Typescript version 3.8 (Angular 9 frontend) I try to experiment a bit with no progress.