refactor(ivy): avoid type coercion in `saveNameToExportMap` function (#34335)
refactor(ivy): avoid type coercion in `saveNameToExportMap` function (#34335)

TypeScript 3.7 flags `if` conditions that implicitly coerce a function/method definition. While checking for the `template` presence on a def (actually checking whether we work with Component) in `saveNameToExportMap`, the `if` condition had implicit type coercion. This commit updates the condition to use the `isComponentDef` function (that checks `def.template` against `null` internally) to avoid compilation errors with TypeScript 3.7.

PR Close #34335

matsko/angular,gdi2290/angular,ocombe/angular,alxhub/angular,StephenFluin/angular,brandonroberts/angular,wKoza/angular,angular-indonesia/angular,manekinekko/angular,IdeaBlade/angular,filipesilva/angular,matsko/angular,wKoza/angular,ocombe/angular,ocombe/angular,ocombe/angular,brandonroberts/angular,mgechev/angular,gkalpak/angular,brandonroberts/angular,brandonroberts/angular,alxhub/angular,wKoza/angular,ocombe/angular,brandonroberts/angular,angular/angular,angular-indonesia/angular,filipesilva/angular,angular/angular,blesh/angular,StephenFluin/angular,Toxicable/angular,matsko/angular,vikerman/angular,angular/angular,JiaLiPassion/angular,gdi2290/angular,shairez/angular,JiaLiPassion/angular,IdeaBlade/angular,wKoza/angular,mgechev/angular,IdeaBlade/angular,IdeaBlade/angular,gdi2290/angular,IdeaBlade/angular,Toxicable/angular,manekinekko/angular,StephenFluin/angular,mgechev/angular,snaptech/angular,alxhub/angular,manekinekko/angular,matsko/angular,gnomeontherun/angular,Toxicable/angular,angular-indonesia/angular,gnomeontherun/angular,shairez/angular,JiaLiPassion/angular,alxhub/angular,gdi2290/angular,wKoza/angular,vikerman/angular,Toxicable/angular,alxhub/angular,wKoza/angular,gkalpak/angular,shairez/angular,blesh/angular,snaptech/angular,StephenFluin/angular,snaptech/angular,gkalpak/angular,angular-indonesia/angular,gdi2290/angular,ocombe/angular,shairez/angular,manekinekko/angular,gkalpak/angular,StephenFluin/angular,vikerman/angular,snaptech/angular,matsko/angular,angular/angular,manekinekko/angular,Toxicable/angular,snaptech/angular,blesh/angular,vikerman/angular,blesh/angular,gnomeontherun/angular,Toxicable/angular,filipesilva/angular,vikerman/angular,blesh/angular,brandonroberts/angular,filipesilva/angular,mgechev/angular,filipesilva/angular,gnomeontherun/angular,manekinekko/angular,gdi2290/angular,shairez/angular,snaptech/angular,JiaLiPassion/angular,vikerman/angular,mgechev/angular