Skip to content

Resolve "Upgrade to TypeScript 4.6"

Hanhoan Truong requested to merge 1297-upgrade-to-typescript-4-6 into main

This is the list of errors that caused the app to not compile and which were fixed:


Error: lib/common/src/home/homepage.component.html:3:22 - error TS2873: This kind of expression is always falsy.
3 [bannerMarkdown]  = "(rccBannerService | async)?.markdown | translate"                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/common/src/home/homepage.component.ts:20:19    20     templateUrl:  'homepage.component.html',                         ~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component HomePageComponent.

Error: lib/common/src/home/homepage.component.html:4:19 - error TS2873: This kind of expression is always falsy.
4 [bannerColor]  = "(rccBannerService | async)?.color"                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/common/src/home/homepage.component.ts:20:19    20     templateUrl:  'homepage.component.html',                         ~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component HomePageComponent.

Error: lib/common/src/items/item.commons.ts:103:40 - error TS2872: This kind of expression is always truthy.
103  return getProvider(ITEM_ACTIONS, x, !!'multi')                                           ~~~~~~~

Error: lib/common/src/items/item.commons.ts:160:48 - error TS2872: This kind of expression is always truthy.
160  return getProvider(ITEM_REPRESENTATIONS, x, !!'multi')                                                   ~~~~~~~

Error: lib/common/src/settings-page/components/handler-setting/handler-setting.component.html:3:15 - error TS2873: This kind of expression is always falsy.
3  (click)   = "setting.entry.handler?.()"                ~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/common/src/settings-page/components/handler-setting/handler-setting.component.ts:6:15    6  templateUrl: './handler-setting.component.html',                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component HandlerSettingComponent.

Error: lib/common/src/ui-components/card/card.component.html:19:23 - error TS2873: This kind of expression is always falsy.
19  [attr.aria-label] = "primaryAction?.label | translate"                         ~~~~~~~~~~~~~~~~~~~~
  lib/common/src/ui-components/card/card.component.ts:49:16    49  templateUrl:  './card.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccCardComponent.

Error: lib/common/src/ui-components/card/card.component.html:20:16 - error TS2873: This kind of expression is always falsy.
20  [title]    = "primaryAction?.label | translate"                  ~~~~~~~~~~~~~~~~~~~~
  lib/common/src/ui-components/card/card.component.ts:49:16    49  templateUrl:  './card.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccCardComponent.

Error: lib/features/src/due-questions/overview-page/overview-page.component.html:3:16 - error TS2873: This kind of expression is always falsy.
3  <div *ngIf = "questionIds?.length === 0">                 ~~~~~~~~~~~~~~~~~~~
  lib/features/src/due-questions/overview-page/overview-page.component.ts:15:16    15  templateUrl:  './overview-page.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component DueQuestionsOverviewPageComponent.

Error: lib/features/src/due-questions/overview-page/overview-page.component.html:17:16 - error TS2873: This kind of expression is always falsy.
17  <div *ngIf = "questionIds?.length > 0">                  ~~~~~~~~~~~~~~~~~~~
  lib/features/src/due-questions/overview-page/overview-page.component.ts:15:16    15  templateUrl:  './overview-page.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component DueQuestionsOverviewPageComponent.

Error: lib/features/src/quad-question-edit/quad-question-edit-widget/quad-question-edit-widget.component.html:2:18 - error TS2873: This kind of expression is always falsy.
2  <ion-row *ngIf="wordingControl?.enabled">                   ~~~~~~~~~~~~~~~~~~~~~~~
  lib/features/src/quad-question-edit/quad-question-edit-widget/quad-question-edit-widget.component.ts:19:16    19  templateUrl : './quad-question-edit-widget.component.html'                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component QuadQuestionEditWidgetComponent.

Error: lib/features/src/report-stacked-view/view/report-stacked-view.component.html:31:56 - error TS2873: This kind of expression is always falsy.
31      [hidden]   = "datasetInfo.dataset.question.id === pinnedDataSetInfo?.dataset?.question?.id"                                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/features/src/report-stacked-view/view/report-stacked-view.component.ts:40:15    40  templateUrl: './report-stacked-view.component.html',                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component ReportStackedViewComponent.

Error: lib/features/src/report-stacked-view/view/report-stacked-view.component.html:31:56 - error TS2873: This kind of expression is always falsy.
31      [hidden]   = "datasetInfo.dataset.question.id === pinnedDataSetInfo?.dataset?.question?.id"                                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/features/src/report-stacked-view/view/report-stacked-view.component.ts:40:15    40  templateUrl: './report-stacked-view.component.html',                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component ReportStackedViewComponent.

Error: lib/features/src/report-stacked-view/view/report-stacked-view.component.html:31:56 - error TS2873: This kind of expression is always falsy.
31      [hidden]   = "datasetInfo.dataset.question.id === pinnedDataSetInfo?.dataset?.question?.id"                                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/features/src/report-stacked-view/view/report-stacked-view.component.ts:40:15    40  templateUrl: './report-stacked-view.component.html',                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component ReportStackedViewComponent.

Error: lib/features/src/symptom-check-queries/symptom-check-query-run/symptom-check-query-run.component.html:34:17 - error TS2873: This kind of expression is always falsy.
34    [slides]  = "symptomCheck?.presentation?.slides || symptomCheck?.questionIds"                   ~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/features/src/symptom-check-queries/symptom-check-query-run/symptom-check-query-run.component.ts:58:15    58  templateUrl: './symptom-check-query-run.component.html',                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component SymptomCheckQueryRunComponent.

Error: lib/features/src/symptom-check-queries/symptom-check-query-run/symptom-check-query-run.component.html:34:17 - error TS2873: This kind of expression is always falsy.
34    [slides]  = "symptomCheck?.presentation?.slides || symptomCheck?.questionIds"                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/features/src/symptom-check-queries/symptom-check-query-run/symptom-check-query-run.component.ts:58:15    58  templateUrl: './symptom-check-query-run.component.html',                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component SymptomCheckQueryRunComponent.

Error: lib/features/src/symptom-check-queries/symptom-check-query-run/symptom-check-query-run.component.html:34:55 - error TS2873: This kind of expression is always falsy.
34    [slides]  = "symptomCheck?.presentation?.slides || symptomCheck?.questionIds"                                                         ~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/features/src/symptom-check-queries/symptom-check-query-run/symptom-check-query-run.component.ts:58:15    58  templateUrl: './symptom-check-query-run.component.html',                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component SymptomCheckQueryRunComponent.

Error: lib/features/src/symptom-checks/view/view-page/view-page.component.html:29:29 - error TS2873: This kind of expression is always falsy.
29  <h1 class ="ion-padding">{{symptom_check?.meta.label}}</h1>                               ~~~~~~~~~~~~~~~~~~~
  lib/features/src/symptom-checks/view/view-page/view-page.component.ts:27:16    27  templateUrl:  './view-page.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component SymptomCheckViewPageComponent.

Error: lib/themes/bengal/_injections/item-select-modal/item-select-modal.component.html:27:20 - error TS2873: This kind of expression is always falsy.
27     <span *ngIf = "searchControl.value?.trim()" >                      ~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/_injections/item-select-modal/item-select-modal.component.ts:29:15    29  templateUrl: './item-select-modal.component.html',                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component BengalItemSelectModalComponent.

Error: lib/themes/bengal/_injections/item-select-modal/item-select-modal.component.html:27:20 - error TS2873: This kind of expression is always falsy.
27     <span *ngIf = "searchControl.value?.trim()" >                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/_injections/item-select-modal/item-select-modal.component.ts:29:15    29  templateUrl: './item-select-modal.component.html',                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component BengalItemSelectModalComponent.

Error: lib/themes/bengal/_injections/item-select-modal/item-select-modal.component.html:28:10 - error TS2873: This kind of expression is always falsy.
28      ("{{searchControl.value?.trim()}}")            ~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/_injections/item-select-modal/item-select-modal.component.ts:29:15    29  templateUrl: './item-select-modal.component.html',                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component BengalItemSelectModalComponent.

Error: lib/themes/bengal/_injections/item-select-modal/item-select-modal.component.html:28:10 - error TS2873: This kind of expression is always falsy.
28      ("{{searchControl.value?.trim()}}")            ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/_injections/item-select-modal/item-select-modal.component.ts:29:15    29  templateUrl: './item-select-modal.component.html',                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component BengalItemSelectModalComponent.

Error: lib/themes/bengal/action-button/action-button.component.html:91:31 - error TS2873: This kind of expression is always falsy.
91    [ngClass]   = "{ disabled: action?.disabled?.() ?? false, outline }"                                 ~~~~~~~~~~~~~~~~
  lib/themes/bengal/action-button/action-button.component.ts:19:15    19  templateUrl: './action-button.component.html',                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccActionButtonComponent.

Error: lib/themes/bengal/action-button/action-button.component.html:91:31 - error TS2873: This kind of expression is always falsy.
91    [ngClass]   = "{ disabled: action?.disabled?.() ?? false, outline }"                                 ~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/action-button/action-button.component.ts:19:15    19  templateUrl: './action-button.component.html',                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccActionButtonComponent.

Error: lib/themes/bengal/action-button/action-button.component.html:106:21 - error TS2873: This kind of expression is always falsy.
106     [disabled]   = "action.disabled?.()"                        ~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/action-button/action-button.component.ts:19:15    19  templateUrl: './action-button.component.html',                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccActionButtonComponent.

Error: lib/themes/bengal/date-picker/date-picker.component.html:59:28 - error TS2873: This kind of expression is always falsy.
59      '-highlight'        : day.label?.highlight,                              ~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/date-picker/date-picker.component.ts:122:21    122     templateUrl:    './date-picker.component.html',                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccDatePickerComponent.

Error: lib/themes/bengal/item-tag/list/item-tag-list.component.html:18:14 - error TS2873: This kind of expression is always falsy.
18     *ngIf = "itemRepresentation?.icon"                ~~~~~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/item-tag/list/item-tag-list.component.ts:17:16    17  templateUrl:  './item-tag-list.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccListItemTagComponent.

Error: lib/themes/bengal/item-tag/list/item-tag-list.component.html:19:15 - error TS2873: This kind of expression is always falsy.
19     [name] = "itemRepresentation?.icon"                 ~~~~~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/item-tag/list/item-tag-list.component.ts:17:16    17  templateUrl:  './item-tag-list.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccListItemTagComponent.

Error: lib/themes/bengal/item-tag/list/item-tag-list.component.html:23:22 - error TS2873: This kind of expression is always falsy.
23    class = "label {{ itemRepresentation?.cssClass || '' }}">                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/item-tag/list/item-tag-list.component.ts:17:16    17  templateUrl:  './item-tag-list.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccListItemTagComponent.

Error: lib/themes/bengal/item-tag/list/item-tag-list.component.html:32:41 - error TS2873: This kind of expression is always falsy.
32     *ngIf      = "!itemLabelTemplate && itemRepresentation?.labelComponent"                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/item-tag/list/item-tag-list.component.ts:17:16    17  templateUrl:  './item-tag-list.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccListItemTagComponent.

Error: lib/themes/bengal/item-tag/list/item-tag-list.component.html:33:30 - error TS2873: This kind of expression is always falsy.
33     [ngComponentOutlet]   = "itemRepresentation?.labelComponent"                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/item-tag/list/item-tag-list.component.ts:17:16    17  templateUrl:  './item-tag-list.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccListItemTagComponent.

Error: lib/themes/bengal/item-tag/standalone/item-tag-standalone.component.html:9:15 - error TS2873: This kind of expression is always falsy.
9      *ngIf = "itemRepresentation?.icon"                ~~~~~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/item-tag/standalone/item-tag-standalone.component.ts:17:16    17  templateUrl:  './item-tag-standalone.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccStandaloneItemTagComponent.

Error: lib/themes/bengal/item-tag/standalone/item-tag-standalone.component.html:10:16 - error TS2873: This kind of expression is always falsy.
10      [name] = "itemRepresentation?.icon"                  ~~~~~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/item-tag/standalone/item-tag-standalone.component.ts:17:16    17  templateUrl:  './item-tag-standalone.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccStandaloneItemTagComponent.

Error: lib/themes/bengal/item-tag/standalone/item-tag-standalone.component.html:15:17 - error TS2873: This kind of expression is always falsy.
15     class = "{{ itemRepresentation?.cssClass || '' }}">                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/item-tag/standalone/item-tag-standalone.component.ts:17:16    17  templateUrl:  './item-tag-standalone.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccStandaloneItemTagComponent.

Error: lib/themes/bengal/item-tag/standalone/item-tag-standalone.component.html:24:42 - error TS2873: This kind of expression is always falsy.
24      *ngIf      = "!itemLabelTemplate && itemRepresentation?.labelComponent"                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/item-tag/standalone/item-tag-standalone.component.ts:17:16    17  templateUrl:  './item-tag-standalone.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccStandaloneItemTagComponent.

Error: lib/themes/bengal/item-tag/standalone/item-tag-standalone.component.html:25:31 - error TS2873: This kind of expression is always falsy.
25      [ngComponentOutlet]   = "itemRepresentation?.labelComponent"                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  lib/themes/bengal/item-tag/standalone/item-tag-standalone.component.ts:17:16    17  templateUrl:  './item-tag-standalone.component.html',                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    Error occurs in the template of component RccStandaloneItemTagComponent.

For more details, feel free to read the commit messages 😉 😸 #ripwip

Closes #1297 (closed)

Edited by Hanhoan Truong

Merge request reports

Loading