Skip to content

Create a React to-do app with TypeScript using hooks (useState, useEffect) and type-safe components. Set up a Node.js API with Express and TypeScript for CRUD operations on to-dos, ensuring type-safe requests and responses. Use axios or fetch to connect the frontend with the backend.

Notifications You must be signed in to change notification settings

Bikramai/TypeScript

Repository files navigation

TypeScript

Introduction

A programming language to address shortcomings of JavaScript. We can think brother and sister of JavaScript. JavaScript is kids like without any discipline who does whatever he or she wants. Typscript in otherhand like kids with discipline.

Technically, specking Typescript is programming language built on top of JavaScript. So, every JavaScript file is a valid Typescript file.

Benefits of Typescript or some of the features of Typescript that help us to build robust and maintainable application in less time.

  • Static typing
    • We have two type of programming languages Statically-Typed (C++, C#, Java) and Dynamically-Typed(JavaScript, Python, Ruby)
  • Code completion
  • Refactoring
  • Shorthand notations

TypeScript is essentially JavaScript with Type Checking. With TypeScript we explicitly set the type of a variable upon decoration just like how we code statically type languages then we pass our code into compilier and the compiler will tell us if we are doing something wrong so we can catch our a lot of mistakes as compile time. We can use where in frontend or backend.

Drawbacks of TypeScript:

  • Compilation .ts ———> Compiler ———> .js Transpiration

  • Discipline in Coding TypeScript ——> Medium to large projects JavaScript ———> Simple projects

You'll Learn

Section-1: Getting Staart With TypeScript

  • Introduction to TypeScript
  • Setting up the development environment
  • Creating your first TypeScript program
  • Configuring the TypeScript compiler
  • Debugging TypeScript applications

Section-2: Fundamentals

  • any Type
  • Arrays
  • Tuples
  • Enums
  • Functions
  • Objects

Section-3: Advanced Types

  • Type aliases
  • Unions and intersections
  • Type narrowing
  • Nullable types
  • Unknown type
  • Never type

Section-4: Classes, Interfaces and Object-Oriented Programming

  • OOP
  • Classes
  • Constructors
  • Properties and Methods
  • Access control Keywords
  • Getters and setters
  • Static members
  • Index signatures
  • Inheritance
  • Ploymorphism
  • Abstract classes
  • Interfaces

Section-5: Generics

  • Generics classes
  • Generics functions
  • Generics interfaces
  • Generics constraints
  • Type Mapping

Section-6: Decorators

  • What are decorators
  • Class decorators
  • Method decorators
  • Property decorators
  • Accessor decorators
  • Parameter decorators

Section-7: Modules

  • Creating and using modules
  • Module formats
  • Default exports
  • Wildcard imports
  • Re-exporting

Section-8: Integration with JavaScript

How to run JavaScript and TypeScript side by side.

  • Including JS code in TS projects
  • Type checking JS code
  • JSDocs
  • Declaration (Type Definition)
  • Using declaration files from @types/

Section-9: React with TypeScript

About

Create a React to-do app with TypeScript using hooks (useState, useEffect) and type-safe components. Set up a Node.js API with Express and TypeScript for CRUD operations on to-dos, ensuring type-safe requests and responses. Use axios or fetch to connect the frontend with the backend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published