mapcomplete/Customizations/SharedTagRenderings.ts

21 lines
605 B
TypeScript
Raw Normal View History

2020-10-27 01:01:34 +01:00
import * as questions from "../assets/questions/questions.json";
import TagRenderingConfig from "./JSON/TagRenderingConfig";
export default class SharedTagRenderings {
public static SharedTagRendering = SharedTagRenderings.generatedSharedFields();
private static generatedSharedFields() {
const dict = {}
for (const key in questions) {
try {
dict[key] = new TagRenderingConfig(questions[key])
} catch (e) {
console.error("COULD NOT PARSE", key, " FROM QUESTIONS:", e)
}
}
return dict;
}
}