fix: update eslint settings

This commit is contained in:
Joachim Van Herwegen
2020-06-03 16:02:19 +02:00
parent 3e2cfaf11e
commit a07f440ab6
12 changed files with 47 additions and 53 deletions

View File

@@ -2,23 +2,22 @@ import { AsyncHandler } from '../../src/util/AsyncHandler';
export class StaticAsyncHandler<TOut> extends AsyncHandler<any, TOut> {
private readonly canHandleStatic: boolean;
private readonly handleStatic: TOut;
public constructor (canHandleStatic: boolean, handleStatic: TOut) {
public constructor(canHandleStatic: boolean, handleStatic: TOut) {
super();
this.canHandleStatic = canHandleStatic;
this.handleStatic = handleStatic;
}
public async canHandle (): Promise<void> {
public async canHandle(): Promise<void> {
if (this.canHandleStatic) {
return;
}
throw new Error('Not supported.');
}
public async handle (): Promise<TOut> {
public async handle(): Promise<TOut> {
return this.handleStatic;
}
}