diff --git a/packages/analysis/src/static/Parser.ts b/packages/analysis/src/static/Parser.ts index 95f995b1..12f4bee3 100644 --- a/packages/analysis/src/static/Parser.ts +++ b/packages/analysis/src/static/Parser.ts @@ -98,7 +98,7 @@ export default class Parser throw new UnexpectedParseResult('a declaration definition'); } - return model as ESDeclaration; + return model; } parseFunction(code: string): ESFunction @@ -111,7 +111,7 @@ export default class Parser throw new UnexpectedParseResult('a function definition'); } - return model as ESFunction; + return model; } parseClass(code: string): ESClass @@ -124,7 +124,7 @@ export default class Parser throw new UnexpectedParseResult('a class definition'); } - return model as ESClass; + return model; } #parseScope(tokenList: TokenList): ESScope diff --git a/packages/build/src/source/segment/Reader.ts b/packages/build/src/source/segment/Reader.ts index 6a4b2b50..38eb4d57 100644 --- a/packages/build/src/source/segment/Reader.ts +++ b/packages/build/src/source/segment/Reader.ts @@ -43,10 +43,10 @@ const DEFAULT_VERSION_NUMBER = '0.0.0'; export default class SegmentReader { - #fileManager: FileManager; - #repository: ModuleRepository; + readonly #fileManager: FileManager; + readonly #repository: ModuleRepository; - #fileHelper = new FileHelper(); + readonly #fileHelper = new FileHelper(); constructor(fileManager: FileManager, repository: ModuleRepository) { diff --git a/packages/execution/src/errors/ImplementationNotFound.ts b/packages/execution/src/errors/ImplementationNotFound.ts index 0dd3e78d..01f961b6 100644 --- a/packages/execution/src/errors/ImplementationNotFound.ts +++ b/packages/execution/src/errors/ImplementationNotFound.ts @@ -3,8 +3,8 @@ import { NotFound } from '@jitar/errors'; export default class ImplementationNotFound extends NotFound { - #fqn: string; - #version: string; + readonly #fqn: string; + readonly #version: string; constructor(fqn: string, version: string) { diff --git a/packages/execution/src/errors/InvalidParameterValue.ts b/packages/execution/src/errors/InvalidParameterValue.ts index 76f0cc1a..9294eb4f 100644 --- a/packages/execution/src/errors/InvalidParameterValue.ts +++ b/packages/execution/src/errors/InvalidParameterValue.ts @@ -3,7 +3,7 @@ import { BadRequest } from '@jitar/errors'; export default class InvalidParameterValue extends BadRequest { - #parameterName: string; + readonly #parameterName: string; constructor(parameterName: string) { diff --git a/packages/execution/src/errors/InvalidVersionNumber.ts b/packages/execution/src/errors/InvalidVersionNumber.ts index 81761e5b..adb8cdfa 100644 --- a/packages/execution/src/errors/InvalidVersionNumber.ts +++ b/packages/execution/src/errors/InvalidVersionNumber.ts @@ -3,7 +3,7 @@ import { BadRequest } from '@jitar/errors'; export default class InvalidVersionNumber extends BadRequest { - #number: string; + readonly #number: string; constructor(number: string) { diff --git a/packages/execution/src/errors/MissingParameterValue.ts b/packages/execution/src/errors/MissingParameterValue.ts index 9339f1f4..8ffdf12c 100644 --- a/packages/execution/src/errors/MissingParameterValue.ts +++ b/packages/execution/src/errors/MissingParameterValue.ts @@ -3,7 +3,7 @@ import { BadRequest } from '@jitar/errors'; export default class MissingParameterValue extends BadRequest { - #parameterName: string; + readonly #parameterName: string; constructor(parameterName: string) { diff --git a/packages/execution/src/errors/ProcedureNotFound.ts b/packages/execution/src/errors/ProcedureNotFound.ts index 54091614..08827bd6 100644 --- a/packages/execution/src/errors/ProcedureNotFound.ts +++ b/packages/execution/src/errors/ProcedureNotFound.ts @@ -3,7 +3,7 @@ import { NotFound } from '@jitar/errors'; export default class ProcedureNotFound extends NotFound { - #fqn: string; + readonly #fqn: string; constructor(fqn: string) { diff --git a/packages/execution/src/errors/UnknownParameter.ts b/packages/execution/src/errors/UnknownParameter.ts index 268d028f..ac3dddf7 100644 --- a/packages/execution/src/errors/UnknownParameter.ts +++ b/packages/execution/src/errors/UnknownParameter.ts @@ -3,7 +3,7 @@ import { BadRequest } from '@jitar/errors'; export default class UnknownParameter extends BadRequest { - #parameterName: string; + readonly #parameterName: string; constructor(parameterName: string) { diff --git a/packages/http/src/HttpServer.ts b/packages/http/src/HttpServer.ts index b0337568..c329ec58 100644 --- a/packages/http/src/HttpServer.ts +++ b/packages/http/src/HttpServer.ts @@ -18,7 +18,7 @@ export default class HttpServer readonly #app: Express; #http?: Http; - #validator = new Validator(); + readonly #validator = new Validator(); constructor(server: Server, port: string = Defaults.PORT_NUMBER, bodyLimit: number = Defaults.BODY_LIMIT) { diff --git a/packages/sourcing/src/errors/FileNotFound.ts b/packages/sourcing/src/errors/FileNotFound.ts index bb886463..6246c422 100644 --- a/packages/sourcing/src/errors/FileNotFound.ts +++ b/packages/sourcing/src/errors/FileNotFound.ts @@ -1,7 +1,7 @@ export default class FileNotFound extends Error { - #filename: string; + readonly #filename: string; constructor(filename: string) {