This task is a simple Todo List application built with TypeScript, html and css. The application helps users manage tasks by allowing them to add, complete, edit, search and delete todos through a simple user interface.
The original task was to:
-
Create a
TodoIteminterface with:idtaskcompleted
-
Implement a
TodoListclass with methods to:- Add todo items
- Complete todo items
- Remove todo items
- List all todo items
-
Maintain an array of
TodoItemobjects. -
Add a method to filter todos by completed status.
-
Implement a method to update a todo task description.
-
Add a method to clear completed todos.
-
Extend the
TodoIteminterface to include adueDateproperty of typeDate.
Apart from the required features, I also added:
- Task priority levels (
Low,High) - Search functionality
- Edit functionality
- A simple user interface using html and css
- Dynamic rendering of tasks on the page
- Error handling for empty task inputs
Users can add a task with:
- Task name
- Due date
- Priority level
Users can mark tasks as completed.
Completed tasks are displayed differently on the screen.
Users can edit an existing task.
Users can remove tasks from the list.
Users can search for tasks using keywords.
The search is not case-sensitive.
Todos can be filtered based on whether they are completed or not.
Users can remove all completed tasks at once.
- TypeScript
- HTML
- CSS
- DOM Manipulation
TodoApp/
│
├── index.html
├── style.css
├── todo.ts
├── index.ts
├── todo.js
├── index.js
├── README.mdI deployed the application using GitHub pages.
You can view the live project here:
[Live Demo] (https://lichi-fave.github.io/TypeScript-Todo-List-App/)
Compile the TypeScript files:
tsc -w index.ts todo.ts --target ES6 --module ES6This generates:
todo.jsindex.js
Open index.html in your browser or use Live Server in VS Code.
While building this project, I learned how to:
- Use TypeScript interfaces
- Work with classes and objects
- Use access modifiers like
private - Manipulate arrays using methods like:
find()filter()includes()
- Handle errors properly
- Manipulate the DOM using TypeScript
- Connect application logic to a user interface
I also learned how frontend applications update the UI dynamically whenever the data changes.