This repository contains the implementation of TypeScript tasks 0-8 for the ALX Frontend JavaScript project.
- Directory:
task_0/ - Files:
task_0/js/main.ts,task_0/package.json,task_0/.eslintrc.js,task_0/tsconfig.json,task_0/webpack.config.js - Creates a
Studentinterface with firstName, lastName, age, and location - Renders a table using Vanilla JavaScript with student data
- Directory:
task_1/ - File:
task_1/js/main.ts - Implements a
Teacherinterface with readonly firstName/lastName and other properties - Allows adding dynamic attributes to the Teacher object
- Directory:
task_1/ - File:
task_1/js/main.ts - Creates a
Directorsinterface that extendsTeacher - Adds
numberOfReportsproperty to Directors
- Directory:
task_1/ - File:
task_1/js/main.ts - Implements
printTeacherfunction that formats teacher names - Includes
printTeacherFunctioninterface
- Directory:
task_1/ - File:
task_1/js/main.ts - Creates
StudentClasswith constructor and methods - Implements interfaces for both constructor and class
- Directory:
task_2/ - File:
task_2/js/main.ts - Implements
DirectorInterfaceandTeacherInterface - Creates
DirectorandTeacherclasses - Includes
createEmployeefactory function
- Directory:
task_2/ - File:
task_2/js/main.ts - Implements
isDirectortype predicate function - Creates
executeWorkfunction that calls appropriate methods
- Directory:
task_2/ - File:
task_2/js/main.ts - Implements
Subjectsstring literal type (Math|History) - Creates
teachClassfunction with conditional return values
- Directory:
task_3/ - Files:
task_3/js/main.ts,task_3/js/interface.ts,task_3/js/crud.d.ts - Defines
RowIDtype andRowElementinterface - Creates ambient type declarations for CRUD operations
- Demonstrates usage with triple slash directives
- All files transpiled on Ubuntu 18.04
- TypeScript scripts checked with jest (version 24.9.*)
- No TypeScript compiler warnings or errors
- Uses
.tsextension when possible