Git Product home page Git Product logo

3il-typescript's Introduction

Exercice Typescript

alt text

alt text

Initialisation

  1. Installer typescript
npm install -g typescript
  1. Créer le fichier script.ts à la racine du projet
  2. Compiler le fichier .ts en .js avec la commande tsc script.ts
  3. Dans un nouveau terminal, se placer à la racine du projet et lancer la commande php -S 0.0.0.0:4242, le site est désormais accessible depuis http://localhost:4242

Enum State

  1. Dans le fichier script.ts créer un énum State définit par deux élements: Done et Todo.

Interface Todo

  1. Dans le fichier script.ts créer l'interface Todo
  2. Cette interface définit les trois propriétés du schéma

Classe TodoList

La classe TodoList gère un tableau de todo. Il est possible d'ajouter, changer l'état et supprimer une todo.

  1. Dans le fichier script.ts créer la classe TodoList
  2. Implémenter les trois méthodes publiques définies dans le schéma

Après cela, l'application doit fonctionner!

Bonus: Créer un compte sur firebase, installer la CLI firebase et déployer l'application.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.