Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imteekay/thinking-in-types
TypeScript examples to build a mental model for types
https://github.com/imteekay/thinking-in-types
javascript nodejs types typescript
Last synced: 23 days ago
JSON representation
TypeScript examples to build a mental model for types
- Host: GitHub
- URL: https://github.com/imteekay/thinking-in-types
- Owner: imteekay
- License: mit
- Created: 2020-06-24T12:54:18.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-12T00:13:13.000Z (over 2 years ago)
- Last Synced: 2024-10-04T05:41:48.606Z (about 1 month ago)
- Topics: javascript, nodejs, types, typescript
- Language: TypeScript
- Homepage: https://www.iamtk.co/a-mental-model-to-think-in-typescript
- Size: 41 KB
- Stars: 64
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - thinking-in-types
README
# Thinking in Types
This is the source code for the article [A Mental Model to think in Typescript](https://leandrotk.github.io/2020/07/a-mental-model-to-think-in-typescript).
Follow these examples to build a mental model for types:
- [001: JavaScript Types](src/001-javascript-types.ts)
- [002: Simple Sum](src/002-simple-sum.ts)
- [003: Primitive](src/003-primitive.ts)
- [004: Sum all prices](src/004-sum-all-prices.ts)
- [005: Structural vs Nominal Typing](src/005-structural-vs-nominal-typying.ts)
- [006: Runtime vs Compile time](src/006-runtime-vs-compile-time.ts)
- [007: Value space vs Type space](src/007-value-space-vs-type-space.ts)
- [008: Constraints and Type narrowing](src/008-constraints-and-type-narrowing.ts)
- [009: Immutability in compile time](src/009-immutability-in-compile-time.ts)
- [010: Semantics and Readability](src/010-semantics-and-readability.ts)
- [011: Enums](src/011-enums.tsx)
- [012: Optional Property](src/012-optional-properties.ts)
- [013: API Response Optional Property](src/013-api-response-optional-property.ts)
- [014: Union Type](src/014-union-type.ts)
- [015: Intersection Type](src/015-intersection-type.ts)
- [016: Tooling](src/016-tooling.ts)