https://github.com/cedrickchee/typescript-deep-dive
Hands-on TypeScript programming exercises based on "The definitive guide to TypeScript" book.
https://github.com/cedrickchee/typescript-deep-dive
educational-materials learning-by-doing typescript typescript-book
Last synced: 2 months ago
JSON representation
Hands-on TypeScript programming exercises based on "The definitive guide to TypeScript" book.
- Host: GitHub
- URL: https://github.com/cedrickchee/typescript-deep-dive
- Owner: cedrickchee
- License: mit
- Created: 2018-07-25T11:50:18.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-03T18:58:35.000Z (over 2 years ago)
- Last Synced: 2025-01-18T17:49:32.609Z (4 months ago)
- Topics: educational-materials, learning-by-doing, typescript, typescript-book
- Language: TypeScript
- Homepage: http://basarat.gitbooks.io/typescript/content/docs/getting-started.html
- Size: 182 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# My TypeScript Hands-on
This repo contains notes and exercises from my deep dive into TypeScript and I _learn by doing_ the lessons from the **[The definitive guide to TypeScript](https://github.com/basarat/typescript-book/)** book.
**A little context**
I am a polyglot programmer. Over the 10+ years, I have written codes both professionally and as a hobby in many programming languages—from Ruby to JavaScript, Go, Java, and Python. My motivation of learning TypeScript is to improved code quality as I have been writing a lot of JavaScript code since 2013 in my role as a front-end developer, hybrid mobile app developer, and React Native mobile app developer.
## What is TypeScript
[TypeScript](https://www.typescriptlang.org/) is JavaScript that scales.
> TypeScript is a typed superset of JavaScript that compiles to plain JavaScript.
> Any browser. Any host. Any OS. Open source.## Motivation and Design Goals of TypeScript
### Why TypeScript
There are two main goals of TypeScript:
- Provide an **optional type** system for JavaScript.
- Provide planned **features from future JavaScript** editions to current JavaScript engines.The desire for these goals is motivated below.
### Why add types to JavaScript?
Types have proven ability to enhance code quality and understandability. Specifically:
- Types increase your agility when doing refactoring. It's **better for the compiler to catch errors than to have things fail at runtime**.
- **Types are one of the best forms of documentation** you can have. The function signature is a theorem and the function body is the proof.However types have a way of being unnecessarily ceremonious. TypeScript is very particular about keeping the barrier to entry as low as possible. Here's how:
- Your JavaScript is TypeScript
- Types can be implicit
- Types can be explicit
- Types are structural
- Type errors do not prevent JavaScript emit
- Types can be ambient
- Future JavaScript => Now## Project Structure
_WIP. Please check again soon._
Thank you for your interest.