Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonbaars/typescript-demo
Simple TypeScript classes displaying the use of the TypeScript type system.
https://github.com/simonbaars/typescript-demo
Last synced: about 6 hours ago
JSON representation
Simple TypeScript classes displaying the use of the TypeScript type system.
- Host: GitHub
- URL: https://github.com/simonbaars/typescript-demo
- Owner: SimonBaars
- Created: 2023-10-31T11:17:45.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-05T19:24:33.000Z (5 months ago)
- Last Synced: 2024-06-05T21:35:56.790Z (5 months ago)
- Language: TypeScript
- Homepage:
- Size: 70.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Types in TypeScript
Based on a great introduction to types in TypeScript by Eamonn Boyle and Garth Gilmour, here are demo files for learning the TypeScript Type System. VSCode run configurations are provided, as well as auto-formatting and other essentials. Instead of using an IDE, you can also run it from the command line. To install, use:
```
npm install
```Then, to run the separate parts:
```
npx ts-node src/1_types.ts
npx ts-node src/2_structural_typing.ts
npx ts-node src/3_typeof.ts
npx ts-node src/4_union_intersection_types.ts
npx ts-node src/5_literal_value.ts
npx ts-node src/6_template_literals.ts
npx ts-node src/7_utility_types.ts
npx ts-node src/8_mapped_types.ts
npx ts-node src/9_discriminated_unions.ts
```Cheers!