Removed the use of any and enabled the rule in eslint.

Now according to me the conversion is final.
Testing is required.
This commit is contained in:
2020-11-24 08:03:43 +05:30
parent 715e35ef38
commit 2972203148
92 changed files with 610 additions and 378 deletions

View File

@ -7,11 +7,13 @@ describe('PurchaseDialogComponent', () => {
let component: PurchaseDialogComponent;
let fixture: ComponentFixture<PurchaseDialogComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MatDialogModule, PurchaseDialogComponent],
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [MatDialogModule, PurchaseDialogComponent],
}).compileComponents();
}),
);
beforeEach(() => {
fixture = TestBed.createComponent(PurchaseDialogComponent);

View File

@ -6,6 +6,7 @@ import { round } from 'mathjs';
import { Observable, of as observableOf } from 'rxjs';
import { debounceTime, distinctUntilChanged, map, startWith, switchMap } from 'rxjs/operators';
import { Inventory } from '../core/inventory';
import { Product } from '../core/product';
import { ProductService } from '../product/product.service';
import { MathService } from '../shared/math.service';
@ -22,7 +23,7 @@ export class PurchaseDialogComponent implements OnInit {
constructor(
public dialogRef: MatDialogRef<PurchaseDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any,
@Inject(MAT_DIALOG_DATA) public data: { inventory: Inventory },
private fb: FormBuilder,
private math: MathService,
private productSer: ProductService,

View File

@ -9,12 +9,14 @@ describe('PurchaseComponent', () => {
let component: PurchaseComponent;
let fixture: ComponentFixture<PurchaseComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
declarations: [PurchaseComponent],
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [MatDialogModule, ReactiveFormsModule, RouterTestingModule],
declarations: [PurchaseComponent],
}).compileComponents();
}),
);
beforeEach(() => {
fixture = TestBed.createComponent(PurchaseComponent);

View File

@ -11,6 +11,7 @@ import { debounceTime, distinctUntilChanged, map, startWith, switchMap } from 'r
import { AuthService } from '../auth/auth.service';
import { Account } from '../core/account';
import { AccountBalance } from '../core/account-balance';
import { AccountService } from '../core/account.service';
import { DbFile } from '../core/db-file';
import { Inventory } from '../core/inventory';
@ -42,7 +43,7 @@ export class PurchaseComponent implements OnInit, AfterViewInit, OnDestroy {
form: FormGroup;
voucher: Voucher = new Voucher();
product: Product | null = null;
accBal: any;
accBal: AccountBalance | null = null;
displayedColumns = ['product', 'quantity', 'rate', 'tax', 'discount', 'amount', 'action'];