Skip to content

Commit

Permalink
used correct import of SpecificationType
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofVDB1 committed Nov 6, 2024
1 parent cb76f3f commit ec5ddec
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { IConfiguration, YargsParams } from '@oslo-flanders/core';
import { SpecificationType } from '@oslo-flanders/core';
import { injectable } from 'inversify';
import { SpecificationType } from '../utils/specificationTypeEnum';

@injectable()
export class HtmlGenerationServiceConfiguration implements IConfiguration {
Expand Down Expand Up @@ -59,7 +59,7 @@ export class HtmlGenerationServiceConfiguration implements IConfiguration {
this._templates = <string>params.templates;
this._rootTemplate = <string>params.rootTemplate;
this._specificationType = this.getSpecificationType(
<string>params.specificationType,
<string>params.specificationType
);
this._specificationName = <string>params.specificationName;
}
Expand All @@ -81,7 +81,7 @@ export class HtmlGenerationServiceConfiguration implements IConfiguration {
public get metadata(): string {
if (!this._metadata) {
throw new Error(
`Trying to access property "metadata" before it was set.`,
`Trying to access property "metadata" before it was set.`
);
}
return this._metadata;
Expand All @@ -90,7 +90,7 @@ export class HtmlGenerationServiceConfiguration implements IConfiguration {
public get stakeholders(): string {
if (!this._stakeholders) {
throw new Error(
`Trying to access property "stakeholders" before it was set.`,
`Trying to access property "stakeholders" before it was set.`
);
}
return this._stakeholders;
Expand All @@ -99,7 +99,7 @@ export class HtmlGenerationServiceConfiguration implements IConfiguration {
public get language(): string {
if (!this._language) {
throw new Error(
`Trying to access property "language" before it was set.`,
`Trying to access property "language" before it was set.`
);
}
return this._language;
Expand All @@ -108,7 +108,7 @@ export class HtmlGenerationServiceConfiguration implements IConfiguration {
public get specificationType(): SpecificationType {
if (this._specificationType === undefined) {
throw new Error(
`Trying to access property "specificationType" before it was set.`,
`Trying to access property "specificationType" before it was set.`
);
}
return this._specificationType;
Expand All @@ -117,7 +117,7 @@ export class HtmlGenerationServiceConfiguration implements IConfiguration {
public get specificationName(): string {
if (!this._specificationName) {
throw new Error(
`Trying to access property "specificationName" before it was set.`,
`Trying to access property "specificationName" before it was set.`
);
}
return this._specificationName;
Expand All @@ -141,7 +141,7 @@ export class HtmlGenerationServiceConfiguration implements IConfiguration {

default:
throw new Error(
`Unable to translate ${value} to a specification type.`,
`Unable to translate ${value} to a specification type.`
);
}
}
Expand Down

0 comments on commit ec5ddec

Please sign in to comment.