Skip to content
Snippets Groups Projects
Verified Commit 24d1a1aa authored by Jan Loewe's avatar Jan Loewe :speech_balloon:
Browse files

refactor(condition): rename influenceCondition to condition for reusability

parent b8c7d6a4
Branches
No related tags found
No related merge requests found
......@@ -2,14 +2,14 @@ import { XMLElement } from "../XMLElement";
import { TextBlock } from "./TextBlock";
import { Data } from "./Data";
export class InfluenceCondition extends XMLElement {
export class Condition extends XMLElement {
name: TextBlock;
description?: TextBlock;
state?: XMLElement;
data: Data;
constructor(options: Partial<InfluenceCondition> = {}) {
constructor(options: Partial<Condition> = {}) {
super(options);
this.name = new TextBlock(options.name);
......
import { XMLElement } from "../XMLElement";
import { ensureArray } from "../Util";
import { InfluenceCondition } from "./InfluenceCondition";
import { Condition } from "./Condition";
export class InfluenceConditions extends XMLElement {
influenceCondition: InfluenceCondition[];
influenceCondition: Condition[];
constructor(options: Partial<InfluenceConditions> = {}) {
super(options);
this.influenceCondition = ensureArray(options.influenceCondition).map(x => new InfluenceCondition(x));
this.influenceCondition = ensureArray(options.influenceCondition).map(x => new Condition(x));
}
}
......@@ -9,7 +9,7 @@ export * from "./ElementString";
export * from "./ElementStringWithLang";
export * from "./Identification";
export * from "./Identifications";
export * from "./InfluenceCondition";
export * from "./Condition";
export * from "./InfluenceConditions";
export * from "./Item";
export * from "./Items";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment