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

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.

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.