Skip to content

deepakmodidev/TypeScript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TypeScript Learning Repository

Welcome to the TypeScript Learning Repository! This repository is designed to help you learn and practice TypeScript, a statically typed superset of JavaScript that compiles to plain JavaScript.

About TypeScript

TypeScript is a powerful tool for writing robust and maintainable code. It offers features such as static type checking, classes, interfaces, and more. By using TypeScript, you can catch errors early in the development process and improve the overall quality of your code.

Key Features of TypeScript:

  1. Static Typing: TypeScript allows you to define types for variables, function parameters, and return values, helping you catch type-related errors at compile time.
  2. Type Inference: TypeScript can automatically infer types based on the assigned values, reducing the need for explicit type annotations.
  3. Interfaces and Classes: TypeScript supports object-oriented programming with interfaces and classes, making it easier to structure and organize your code.
  4. Compatibility: TypeScript is a superset of JavaScript, meaning any valid JavaScript code is also valid TypeScript code. It can be seamlessly integrated into existing JavaScript projects.

Repository Structure

The repository is organized into several directories, each focusing on different aspects of TypeScript:

Directory Breakdown

  • 01_intro/: This directory contains introductory TypeScript files that cover the basics of TypeScript, including variables, basic types, and type inference.

  • 02_basics/: This directory dives deeper into TypeScript basics, covering functions, objects, arrays, unions, tuples, enums, interfaces, abstract classes, generics, and type narrowing.

  • 03_project_ts/: This directory contains a sample TypeScript project setup with configuration files.

  • hello.js: Compiled JavaScript file from hello.ts.

  • hello.ts: Example TypeScript file demonstrating basic TypeScript features.

  • README.md: This README file.

  • tsconfig.json: TypeScript configuration file for the repository.

Getting Started

To get started with this repository, follow these steps:

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-directory>
  2. Install dependencies:

    npm install
  3. Compile TypeScript files:

    npx tsc
  4. Run the TypeScript files:

    node <compiled-js-file>

Contributing

Contributions are welcome! If you have any suggestions or improvements, feel free to open an issue or submit a pull request.

License

This repository is licensed under the MIT License. See the LICENSE file for more information.

Happy coding!

About

Welcome to the TypeScript Learning Repository! This repository is designed to help you learn and practice TypeScript, a statically typed superset of JavaScript that compiles to plain JavaScript.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors