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:
@ -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);
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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'];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user