fix: fixing eslint problems
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user