Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 2 months ago
JSON representation

Simple TypeScript classes displaying the use of the TypeScript type system.

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!