{"id":23657495,"url":"https://github.com/devsafix/typescript-learning","last_synced_at":"2025-07-08T00:12:56.641Z","repository":{"id":267291373,"uuid":"900793746","full_name":"devsafix/typescript-learning","owner":"devsafix","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-09T13:43:20.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-20T10:11:25.304Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devsafix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-12-09T13:38:02.000Z","updated_at":"2024-12-09T13:43:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"3dfe9ee6-8da8-4f70-92e0-afd5a1781dd5","html_url":"https://github.com/devsafix/typescript-learning","commit_stats":null,"previous_names":["devsafix/typescript-learning"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devsafix/typescript-learning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsafix%2Ftypescript-learning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsafix%2Ftypescript-learning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsafix%2Ftypescript-learning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsafix%2Ftypescript-learning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devsafix","download_url":"https://codeload.github.com/devsafix/typescript-learning/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devsafix%2Ftypescript-learning/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264167370,"owners_count":23567055,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-28T21:54:11.521Z","updated_at":"2025-07-08T00:12:56.634Z","avatar_url":"https://github.com/devsafix.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **TypeScript Learning Guide**\n\nThis repository contains my journey of learning TypeScript. It includes various concepts explained with examples, covering everything from the basics to advanced topics. The purpose is to document key learnings and provide future reference for working with TypeScript effectively.\n\n## **Getting Started**\n\nTo run the examples in this repository:\n\n1. Install [Node.js](https://nodejs.org/) if you haven't already.\n2. Install TypeScript globally:\n   ```bash\n   npm install -g typescript\n   ```\n3. Clone this repository:\n   ```bash\n   git clone https://github.com/your-username/your-repo.git\n   cd your-repo\n   ```\n4. Compile TypeScript files:\n   ```bash\n   tsc \u003cfilename\u003e.ts\n   ```\n5. Run the compiled JavaScript file:\n   ```bash\n   node \u003cfilename\u003e.js\n   ```\n\n## **Learning Topics**\n\n### 1. **Basic Types**\n- Numbers, Strings, Booleans, Arrays, and Tuples\n- Example:\n  ```typescript\n  let isDone: boolean = true;\n  let age: number = 25;\n  let name: string = \"John\";\n  let scores: number[] = [90, 80, 70];\n  let tuple: [number, string] = [1, \"Apple\"];\n  ```\n\n### 2. **Functions**\n- Type annotations for parameters and return types\n- Example:\n  ```typescript\n  function greet(name: string): string {\n      return `Hello, ${name}!`;\n  }\n  ```\n\n### 3. **Type Aliases and Interfaces**\n- Defining reusable types\n- Example:\n  ```typescript\n  type Person = { name: string; age: number };\n  interface Employee extends Person {\n      position: string;\n  }\n  ```\n\n### 4. **Classes**\n- Object-oriented programming with TypeScript\n- Example:\n  ```typescript\n  class Car {\n      constructor(public brand: string, private speed: number) {}\n      drive(): void {\n          console.log(`${this.brand} is driving at ${this.speed} km/h.`);\n      }\n  }\n  ```\n\n### 5. **Generics**\n- Creating reusable components\n- Example:\n  ```typescript\n  function identity\u003cT\u003e(value: T): T {\n      return value;\n  }\n  ```\n\n### 6. **Modules**\n- Importing and exporting in TypeScript\n- Example:\n  ```typescript\n  export function add(a: number, b: number): number {\n      return a + b;\n  }\n\n  import { add } from './math';\n  ```\n\n## **Resources**\n- Official Documentation: [TypeScript Docs](https://www.typescriptlang.org/)\n- Tutorials: [TypeScript Handbook](https://www.typescriptlang.org/docs/handbook/intro.html)\n\n## **Author**\n- **Kawser**\n- LinkedIn: [Your Profile](https://www.linkedin.com/in/devsafix/)\n- GitHub: [Your GitHub](https://github.com/devsafix)\n\n---\n\nHappy coding with TypeScript! 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsafix%2Ftypescript-learning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevsafix%2Ftypescript-learning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevsafix%2Ftypescript-learning/lists"}