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

@ -83,7 +83,7 @@ export class AuthService {
formData.append('otp', otp);
formData.append('grant_type', 'password');
return this.http
.post<any>(loginUrl, formData)
.post<{ access_token: string; token_type: string }>(loginUrl, formData)
.pipe(map((u) => u.access_token))
.pipe(map((u) => AuthService.parseJwt(u)))
.pipe(
@ -113,7 +113,7 @@ export class AuthService {
refreshToken() {
return this.http
.post<any>(refreshUrl, {})
.post<{ access_token: string; token_type: string }>(refreshUrl, {})
.pipe(map((u) => u.access_token))
.pipe(map((u) => AuthService.parseJwt(u)))
.pipe(

View File

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

View File

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