fix: Enable strict TypeScript settings

This commit is contained in:
Joachim Van Herwegen
2020-07-24 09:27:44 +02:00
parent 4001050588
commit dcff424f58
28 changed files with 115 additions and 105 deletions

View File

@@ -11,7 +11,7 @@ export abstract class HttpError extends Error {
* @param name - Error name. Useful for logging and stack tracing.
* @param message - Message to be thrown.
*/
protected constructor(statusCode: number, name: string, message: string) {
protected constructor(statusCode: number, name: string, message?: string) {
super(message);
this.statusCode = statusCode;
this.name = name;

View File

@@ -10,6 +10,6 @@ export class UnsupportedHttpError extends HttpError {
* @param message - Optional, more specific, message.
*/
public constructor(message?: string) {
super(400, 'UnsupportedHttpError', message || 'The given input is not supported by the server configuration.');
super(400, 'UnsupportedHttpError', message ?? 'The given input is not supported by the server configuration.');
}
}