diff --git a/packages/models/src/variable-options.ts b/packages/models/src/variable-options.ts index 15464ceb2..d94b0dd2c 100644 --- a/packages/models/src/variable-options.ts +++ b/packages/models/src/variable-options.ts @@ -1,17 +1,4 @@ -export type VariableOption = - | '{{owner.fullName}}' - | '{{housing.rawAddress}}' - | '{{housing.localId}}' - | '{{housing.invariant}}' - | '{{housing.cadastralReference}}' - | '{{housing.housingKind}}' - | '{{housing.livingArea}}' - | '{{housing.roomsCount}}' - | '{{housing.buildingYear}}' - | '{{housing.vacancyStartYear}}' - | '{{housing.energyConsumption}}'; - -const VARIABLES_OPTIONS: VariableOption[] = [ +const VARIABLES_OPTIONS = [ '{{owner.fullName}}', '{{housing.rawAddress}}', '{{housing.localId}}', @@ -25,6 +12,8 @@ const VARIABLES_OPTIONS: VariableOption[] = [ '{{housing.energyConsumption}}', ]; +export type VariableOption = typeof VARIABLES_OPTIONS[number]; + export function isVariableOption(value: string): value is VariableOption { return VARIABLES_OPTIONS.find((option) => option === value) !== undefined; }