{"id":23589326,"url":"https://github.com/ewdlop/typescript-notes","last_synced_at":"2025-11-03T21:30:34.091Z","repository":{"id":168095957,"uuid":"619001954","full_name":"ewdlop/Typescript-Notes","owner":"ewdlop","description":"Typescript Notes; https://github.com/gcanti/fp-ts; Typing typescript challenges.","archived":false,"fork":false,"pushed_at":"2025-01-07T22:34:13.000Z","size":273,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-07T23:29:04.489Z","etag":null,"topics":["fs-ts","microsoft","type-challenges"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ewdlop.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2023-03-26T00:53:49.000Z","updated_at":"2025-01-07T22:34:17.000Z","dependencies_parsed_at":"2024-12-14T16:34:08.780Z","dependency_job_id":"0e1fd7ca-45e5-413f-bbec-4aab8c376835","html_url":"https://github.com/ewdlop/Typescript-Notes","commit_stats":null,"previous_names":["ewdlop/typescript-notes"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewdlop%2FTypescript-Notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewdlop%2FTypescript-Notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewdlop%2FTypescript-Notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ewdlop%2FTypescript-Notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ewdlop","download_url":"https://codeload.github.com/ewdlop/Typescript-Notes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239419936,"owners_count":19635480,"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":["fs-ts","microsoft","type-challenges"],"created_at":"2024-12-27T06:13:45.901Z","updated_at":"2025-02-18T06:25:15.913Z","avatar_url":"https://github.com/ewdlop.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Typescript-Notes\n\n\u003chttps://github.com/gcanti/fp-ts\u003e\n\n\u003chttps://github.com/type-challenges/type-challenges\u003e\n\n## Project Description\n\nThe `Typescript-Notes` repository is a collection of TypeScript code examples and notes. It serves as a reference for various TypeScript features, patterns, and libraries.\n\n## Setup Instructions\n\nTo set up the project, follow these steps:\n\n1. Clone the repository:\n   ```sh\n   git clone https://github.com/ewdlop/Typescript-Notes.git\n   cd Typescript-Notes\n   ```\n\n2. Install the dependencies:\n   ```sh\n   npm install\n   ```\n\n3. Run the project:\n   ```sh\n   npm start\n   ```\n\n## Project Structure\n\nThe repository contains the following TypeScript files:\n\n- `basic.ts`: Demonstrates basic TypeScript features such as tuples, classes, and type assertions.\n- `class.ts`: Contains examples of TypeScript classes, including inheritance and abstract classes.\n- `copyingSample.ts`: Shows examples of copying objects and arrays using spread syntax and `Object.assign`.\n- `fs-ts-examples/`: A directory containing various examples using the `fp-ts` library.\n- `function.ts`: Demonstrates TypeScript functions, including function types and `this` context.\n- `generics-function.ts`: Contains examples of generic functions in TypeScript.\n- `immutables.ts`: Shows examples of immutable objects and deep freezing.\n- `interface.ts`: Contains examples of TypeScript interfaces and their usage.\n- `internal-type.ts`: Demonstrates TypeScript's built-in utility types.\n- `json.ts`: Shows examples of working with JSON in TypeScript.\n- `lambda-calculus.ts`: Contains examples of lambda calculus in TypeScript.\n- `mixins.ts`: Demonstrates mixins in TypeScript.\n- `monad.ts`: Contains examples of monads in TypeScript.\n- `namespace.ts`: Shows examples of TypeScript namespaces.\n- `no-type.d.ts` and `no-type.js`: Demonstrates using TypeScript with JavaScript files.\n- `object.ts`: Contains examples of working with objects in TypeScript.\n- `refinement-type.ts`: Demonstrates refinement types in TypeScript.\n- `subtype-assignment.ts`: Shows examples of subtype assignments in TypeScript.\n- `tree.ts`: Contains examples of tree data structures in TypeScript.\n- `type-challenges/`: A directory containing solutions to various TypeScript type challenges.\n- `type.ts`: Demonstrates various TypeScript type definitions.\n\n## Usage Examples\n\nHere are some usage examples demonstrating how to use the code in the repository:\n\n### Example 1: Using Classes\n\n```typescript\nimport { Animal, Cat } from './class';\n\nconst animal = new Animal('Jack');\nconst cat = new Cat('Tom');\n\nconsole.log(animal.name); // Output: Jack\ncat.eat(); // Output: Tom is eating.\n```\n\n### Example 2: Using Functions\n\n```typescript\nimport { test } from './function';\n\ntest('John'); // Output: Hello: John\n```\n\n### Example 3: Using Generics\n\n```typescript\nimport { createArray } from './generics-function';\n\nconst numberArray = createArray({ length: 3, value: 42 });\nconsole.log(numberArray); // Output: [42, 42, 42]\n```\n\n## Dependencies\n\nThe project has the following dependencies listed in the `package.json` file:\n\n- `@types/node`: TypeScript definitions for Node.js.\n- `axios`: Promise-based HTTP client for the browser and Node.js.\n- `fp-ts`: Functional programming library for TypeScript.\n- `fp-ts-contrib`: Additional utilities for `fp-ts`.\n- `ts-node`: TypeScript execution environment for Node.js.\n- `typescript`: TypeScript language.\n- `nodemon`: Utility that monitors for changes in source code and automatically restarts the server.\n- `@types/express`: TypeScript definitions for Express.js.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewdlop%2Ftypescript-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fewdlop%2Ftypescript-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fewdlop%2Ftypescript-notes/lists"}