fix: fixing eslint problems

This commit is contained in:
Amadou Ada DIENE
2021-07-20 09:13:46 +02:00
parent f45cd5d04d
commit 1a5a76f912
29 changed files with 223 additions and 165 deletions

View File

@@ -1,13 +1,13 @@
export class AbstractService {
export class AbstractService<In, Out> {
receptionChannel(): string {
throw new Error('Method not implemented.');
throw new Error("Method not implemented yet.");
}
sendingChannel(): string {
throw new Error('Method not implemented.');
throw new Error("Method not implemented yet.");
}
process(...args: any): any {
throw new Error('Method not implemented.');
process(_input: In): Out {
throw new Error("Method not implemented yet.");
}
}

View File

@@ -1,7 +1,7 @@
import { WindowApiConst } from "shared-lib";
import { AbstractService } from "./abstract-service";
export class MultiplesService extends AbstractService {
export class MultiplesService extends AbstractService<number, number[]> {
receptionChannel(): string {
return WindowApiConst.MULTIPLES_INPUT;
}
@@ -10,11 +10,11 @@ export class MultiplesService extends AbstractService {
return WindowApiConst.MULTIPLES_OUTPUT;
}
process(...args: any): any {
process(input: number): number[] {
// From 1 to 10, return input multiples
const multiples = [];
for (let n = 1; n <= 10; n++) {
multiples.push(n * args[0]);
multiples.push(n * input);
}
return multiples;
}