diff --git a/demo/10-my-cv.ts b/demo/10-my-cv.ts index 293fcff6ad..2a3f6bbabf 100644 --- a/demo/10-my-cv.ts +++ b/demo/10-my-cv.ts @@ -9,7 +9,46 @@ const PHONE_NUMBER = "07534563401"; const PROFILE_URL = "https://www.linkedin.com/in/dolan1"; const EMAIL = "docx@com"; -const experiences = [ +interface Experience { + readonly isCurrent: boolean; + readonly summary: string; + readonly title: string; + readonly startDate: { + readonly month: number; + readonly year: number; + }; + readonly endDate?: { + readonly month: number; + readonly year: number; + }; + readonly company: { + readonly name: string; + }; +} + +interface Education { + readonly degree: string; + readonly fieldOfStudy: string; + readonly notes: string; + readonly schoolName: string; + readonly startDate: { + readonly year: number; + }; + readonly endDate: { + readonly year: number; + }; +} + +interface Skill { + readonly name: string; +} + +interface Achivement { + readonly issuer: string; + readonly name: string; +} + +const experiences: Experience[] = [ { isCurrent: true, summary: "Full-stack developer working with Angular and Java. Working for the iShares platform", @@ -75,12 +114,11 @@ const experiences = [ }, ]; -const education = [ +const education: Education[] = [ { degree: "Master of Science (MSc)", fieldOfStudy: "Computer Science", - notes: - "Exam Results: 1st Class with Distinction, Dissertation: 1st Class with Distinction\n\nRelevant Courses: Java and C# Programming, Software Engineering, Artificial Intelligence, \nComputational Photography, Algorithmics, Architecture and Hardware.\n\nCreated a Windows 8 game in JavaScript for the dissertation. \n\nCreated an award-winning 3D stereoscopic game in C# using XNA.", + notes: "Exam Results: 1st Class with Distinction, Dissertation: 1st Class with Distinction\n\nRelevant Courses: Java and C# Programming, Software Engineering, Artificial Intelligence, \nComputational Photography, Algorithmics, Architecture and Hardware.\n\nCreated a Windows 8 game in JavaScript for the dissertation. \n\nCreated an award-winning 3D stereoscopic game in C# using XNA.", schoolName: "University College London", startDate: { year: 2012, @@ -92,8 +130,7 @@ const education = [ { degree: "Bachelor of Engineering (BEng)", fieldOfStudy: "Material Science and Engineering", - notes: - "Exam Results: 2:1, Dissertation: 1st Class with Distinction\n\nRelevant courses: C Programming, Mathematics and Business for Engineers.", + notes: "Exam Results: 2:1, Dissertation: 1st Class with Distinction\n\nRelevant courses: C Programming, Mathematics and Business for Engineers.", schoolName: "Imperial College London", startDate: { year: 2009, @@ -104,7 +141,7 @@ const education = [ }, ]; -const skills = [ +const skills: Skill[] = [ { name: "Angular", }, @@ -119,7 +156,7 @@ const skills = [ }, ]; -const achievements = [ +const achievements: Achivement[] = [ { issuer: "Oracle", name: "Oracle Certified Expert", @@ -128,7 +165,7 @@ const achievements = [ class DocumentCreator { // tslint:disable-next-line: typedef - public create([experiences, educations, skills, achivements]): Document { + public create([experiences, educations, skills, achivements]: [Experience[], Education[], Skill[], Achivement[]]): Document { const document = new Document({ sections: [ { @@ -193,8 +230,7 @@ class DocumentCreator { ), new Paragraph("More references upon request"), new Paragraph({ - text: - "This CV was generated in real-time based on my Linked-In profile from my personal website www.dolan.bio.", + text: "This CV was generated in real-time based on my Linked-In profile from my personal website www.dolan.bio.", alignment: AlignmentType.CENTER, }), ],