Skip to content

IsraelZablianov/TypeScript-Course

Repository files navigation

TypeScript logo

Introduction To TypeScript

Presentation

Attached .pptx file is the presentation file for this course.

About the course

There are going to be two parts for the course.

Part 1 - Introduction To TypeScript

We are going to create a new TypeScript app from scratch.
Our goal is to make this piece of code to work:

const listOfAnimals = new List<Animal>(); 

listOfAnimals.add(new Dog("Joy")); 
listOfAnimals.add(new Dog("Moni")); 
listOfAnimals.add(new Cat("Marshel")); 
listOfAnimals.add(new Horse("Din")); 

listOfAnimals.print();
/*
    Expected output:
    Hello I am Joy!
    Hello I am Moni!
    Hello I am Marshel!
    Hello I am Din!
 */

Let's start

Verify that you have `Npm`, `Node` and `TypeScript` installed globally on your computer.
  • Create a new empty folder.

  • In the root folder add a folder called src. Inside of it we will have most of our code, organized in sub folders and .ts files.

  • In the root folder run tsc --init command (tsconfig.json file should be created). Edit your tsconfig.json if needed (change configuration etc.)

  • In the root folder file run npm init command (package.json file should be created) Edit your package.json if needed (change configuration etc.)

  • At this point your folder should look like:

src/
├─ some-file.ts
├─ some-inner-folder/
|  └─ some-file.ts
└─ package.json
└─ tsconfig.json
  • Add some files to src folder compile and run.

References

About

TypeScript course with presentaion and exercise

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published