Skip to content

akash1520/learnTS

Repository files navigation

learnTS

Noob here learning ts, js sucks.

Why should you learn from me/with me?

  • Too be frank, you shouldn't.
  • Lol just kidding, yeah agreed I'm not that good at TS right now to teach anyone but you can definatley learn with me because it would be so much fun and we
  • can help each other stay consistent.Join me if you're up for this. You can connect with me on my twitter

How to setup

You can do it using npm or pnpm or yarn.

If you want to do it fancy way you can do it with vscode packages but I'm not free unlike you so I'll use pnpm.

I used pnpm becase obviously huh😮‍💨, Who uses slow boring npm now? pnpm installation

So how to install typescript

I wanted to install ts globally but for some reason pnpm doesn't letting me do that. (help!!🥲)

pnpm add typescript

Install using vscode packages

DAY 1

Now so if you're done with this let's see what we will learn today?

  • How to compile TS file.
  • We will get basic intro to typescipt how it work and how you can declare type of any variable.
  • And some best practices about declaring variables.

DAY 2

Today we're learning functionsss and type alias

  • How to use types with function //basic stuff lame
  • Error in TS regarding functions
  • Type alias also how to use some keywords
  • Arrays
  • Union Types

DAY 3

Today we're learning Tuple, Enum and Interface.

Tuples

  • Basic understanding of tuples
  • How can you use it
  • Heads up about problem with tuples in TS

Enum

  • Basics, how they can be useful to you

Interface

  • Basics
  • A few functionalities

And it's a wrap for today.

DAY 4

Today we'll learn Generic type and how to use them.

  • Basic, why we need it, how to use it

DAY 5

Continued generic types

  • Learnt Typecasting
  • Learnt what is exhaustive typecheck but it's something you will better understand by watching a youtube video ig

About

Noob here learning ts, js sucks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published