export namespace main { export class Quiz { Question: string; Answers: string[]; static createFrom(source: any = {}) { return new Quiz(source); } constructor(source: any = {}) { if ('string' === typeof source) source = JSON.parse(source); this.Question = source["Question"]; this.Answers = source["Answers"]; } } }