Add type definitions to demo 10
This commit is contained in:
@ -9,7 +9,46 @@ const PHONE_NUMBER = "07534563401";
|
|||||||
const PROFILE_URL = "https://www.linkedin.com/in/dolan1";
|
const PROFILE_URL = "https://www.linkedin.com/in/dolan1";
|
||||||
const EMAIL = "docx@com";
|
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,
|
isCurrent: true,
|
||||||
summary: "Full-stack developer working with Angular and Java. Working for the iShares platform",
|
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)",
|
degree: "Master of Science (MSc)",
|
||||||
fieldOfStudy: "Computer Science",
|
fieldOfStudy: "Computer Science",
|
||||||
notes:
|
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.",
|
||||||
"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",
|
schoolName: "University College London",
|
||||||
startDate: {
|
startDate: {
|
||||||
year: 2012,
|
year: 2012,
|
||||||
@ -92,8 +130,7 @@ const education = [
|
|||||||
{
|
{
|
||||||
degree: "Bachelor of Engineering (BEng)",
|
degree: "Bachelor of Engineering (BEng)",
|
||||||
fieldOfStudy: "Material Science and Engineering",
|
fieldOfStudy: "Material Science and Engineering",
|
||||||
notes:
|
notes: "Exam Results: 2:1, Dissertation: 1st Class with Distinction\n\nRelevant courses: C Programming, Mathematics and Business for Engineers.",
|
||||||
"Exam Results: 2:1, Dissertation: 1st Class with Distinction\n\nRelevant courses: C Programming, Mathematics and Business for Engineers.",
|
|
||||||
schoolName: "Imperial College London",
|
schoolName: "Imperial College London",
|
||||||
startDate: {
|
startDate: {
|
||||||
year: 2009,
|
year: 2009,
|
||||||
@ -104,7 +141,7 @@ const education = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const skills = [
|
const skills: Skill[] = [
|
||||||
{
|
{
|
||||||
name: "Angular",
|
name: "Angular",
|
||||||
},
|
},
|
||||||
@ -119,7 +156,7 @@ const skills = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const achievements = [
|
const achievements: Achivement[] = [
|
||||||
{
|
{
|
||||||
issuer: "Oracle",
|
issuer: "Oracle",
|
||||||
name: "Oracle Certified Expert",
|
name: "Oracle Certified Expert",
|
||||||
@ -128,7 +165,7 @@ const achievements = [
|
|||||||
|
|
||||||
class DocumentCreator {
|
class DocumentCreator {
|
||||||
// tslint:disable-next-line: typedef
|
// 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({
|
const document = new Document({
|
||||||
sections: [
|
sections: [
|
||||||
{
|
{
|
||||||
@ -193,8 +230,7 @@ class DocumentCreator {
|
|||||||
),
|
),
|
||||||
new Paragraph("More references upon request"),
|
new Paragraph("More references upon request"),
|
||||||
new Paragraph({
|
new Paragraph({
|
||||||
text:
|
text: "This CV was generated in real-time based on my Linked-In profile from my personal website www.dolan.bio.",
|
||||||
"This CV was generated in real-time based on my Linked-In profile from my personal website www.dolan.bio.",
|
|
||||||
alignment: AlignmentType.CENTER,
|
alignment: AlignmentType.CENTER,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user