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,12 +7,14 @@ describe('ReceiptDialogComponent', () => {
let component: ReceiptDialogComponent;
let fixture: ComponentFixture<ReceiptDialogComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [MatDialogRef],
declarations: [ReceiptDialogComponent],
}).compileComponents();
}));
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
imports: [MatDialogRef],
declarations: [ReceiptDialogComponent],
}).compileComponents();
}),
);
beforeEach(() => {
fixture = TestBed.createComponent(ReceiptDialogComponent);

View File

@ -6,7 +6,9 @@ import { Observable, of as observableOf } from 'rxjs';
import { debounceTime, distinctUntilChanged, map, startWith, switchMap } from 'rxjs/operators';
import { Account } from '../core/account';
import { AccountBalance } from '../core/account-balance';
import { AccountService } from '../core/account.service';
import { Journal } from '../core/journal';
import { MathService } from '../shared/math.service';
@Component({
@ -18,11 +20,11 @@ export class ReceiptDialogComponent implements OnInit {
accounts: Observable<Account[]>;
form: FormGroup;
account: Account = new Account();
accBal: any;
accBal: AccountBalance | null = null;
constructor(
public dialogRef: MatDialogRef<ReceiptDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any,
@Inject(MAT_DIALOG_DATA) public data: { journal: Journal; date: string },
private fb: FormBuilder,
private math: MathService,
private accountSer: AccountService,

View File

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

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 { Journal } from '../core/journal';
@ -41,7 +42,7 @@ export class ReceiptComponent implements OnInit, AfterViewInit, OnDestroy {
receiptJournal: Journal = new Journal();
voucher: Voucher = new Voucher();
account: Account | null = null;
accBal: any;
accBal: AccountBalance | null = null;
displayedColumns = ['account', 'amount', 'action'];