Browse Source
Task/enable strict null checks in libs/ui (#6637)
* Enable strict null checks
pull/6631/head^2
Kenrick Tandrian
2 days ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with
10 additions and
6 deletions
-
libs/ui/src/lib/historical-market-data-editor/historical-market-data-editor-dialog/historical-market-data-editor-dialog.component.ts
-
libs/ui/src/lib/no-transactions-info/no-transactions-info.component.ts
-
libs/ui/src/lib/shared/abstract-mat-form-field.ts
-
libs/ui/tsconfig.json
|
|
@ -25,6 +25,7 @@ import { MatInputModule } from '@angular/material/input'; |
|
|
import { IonIcon } from '@ionic/angular/standalone'; |
|
|
import { IonIcon } from '@ionic/angular/standalone'; |
|
|
import { addIcons } from 'ionicons'; |
|
|
import { addIcons } from 'ionicons'; |
|
|
import { calendarClearOutline, refreshOutline } from 'ionicons/icons'; |
|
|
import { calendarClearOutline, refreshOutline } from 'ionicons/icons'; |
|
|
|
|
|
import { isNil } from 'lodash'; |
|
|
|
|
|
|
|
|
import { HistoricalMarketDataEditorDialogParams } from './interfaces/interfaces'; |
|
|
import { HistoricalMarketDataEditorDialogParams } from './interfaces/interfaces'; |
|
|
|
|
|
|
|
|
@ -90,7 +91,9 @@ export class GfHistoricalMarketDataEditorDialogComponent implements OnInit { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public onUpdate() { |
|
|
public onUpdate() { |
|
|
if (this.marketPrice() === undefined) { |
|
|
const marketPrice = this.marketPrice(); |
|
|
|
|
|
|
|
|
|
|
|
if (isNil(marketPrice)) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -100,8 +103,8 @@ export class GfHistoricalMarketDataEditorDialogComponent implements OnInit { |
|
|
marketData: { |
|
|
marketData: { |
|
|
marketData: [ |
|
|
marketData: [ |
|
|
{ |
|
|
{ |
|
|
date: this.data.dateString, |
|
|
marketPrice, |
|
|
marketPrice: this.marketPrice() |
|
|
date: this.data.dateString |
|
|
} |
|
|
} |
|
|
] |
|
|
] |
|
|
}, |
|
|
}, |
|
|
|
|
|
@ -24,5 +24,5 @@ export class GfNoTransactionsInfoComponent { |
|
|
@HostBinding('class.has-border') @Input() hasBorder = true; |
|
|
@HostBinding('class.has-border') @Input() hasBorder = true; |
|
|
|
|
|
|
|
|
public routerLinkPortfolioActivities = |
|
|
public routerLinkPortfolioActivities = |
|
|
internalRoutes.portfolio.subRoutes.activities.routerLink; |
|
|
internalRoutes.portfolio.subRoutes?.activities.routerLink; |
|
|
} |
|
|
} |
|
|
|
|
|
@ -37,7 +37,7 @@ export abstract class AbstractMatFormField<T> |
|
|
private static nextId = 0; |
|
|
private static nextId = 0; |
|
|
|
|
|
|
|
|
protected constructor( |
|
|
protected constructor( |
|
|
protected _elementRef: ElementRef, |
|
|
protected _elementRef: ElementRef<HTMLElement>, |
|
|
protected _focusMonitor: FocusMonitor, |
|
|
protected _focusMonitor: FocusMonitor, |
|
|
public readonly ngControl: NgControl |
|
|
public readonly ngControl: NgControl |
|
|
) { |
|
|
) { |
|
|
@ -137,7 +137,7 @@ export abstract class AbstractMatFormField<T> |
|
|
|
|
|
|
|
|
public ngDoCheck() { |
|
|
public ngDoCheck() { |
|
|
if (this.ngControl) { |
|
|
if (this.ngControl) { |
|
|
this.errorState = this.ngControl.invalid && this.ngControl.touched; |
|
|
this.errorState = !!(this.ngControl.invalid && this.ngControl.touched); |
|
|
this.stateChanges.next(); |
|
|
this.stateChanges.next(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
@ -19,6 +19,7 @@ |
|
|
"target": "es2020", |
|
|
"target": "es2020", |
|
|
// TODO: Remove once solved in tsconfig.base.json |
|
|
// TODO: Remove once solved in tsconfig.base.json |
|
|
"strict": false, |
|
|
"strict": false, |
|
|
|
|
|
"strictNullChecks": true, |
|
|
"noImplicitReturns": true, |
|
|
"noImplicitReturns": true, |
|
|
"noFallthroughCasesInSwitch": true |
|
|
"noFallthroughCasesInSwitch": true |
|
|
}, |
|
|
}, |
|
|
|