GithubHelp home page GithubHelp logo

cedrickchee / typescript-deep-dive Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 186 KB

Hands-on TypeScript programming exercises based on "The definitive guide to TypeScript" book.

Home Page: http://basarat.gitbooks.io/typescript/content/docs/getting-started.html

License: MIT License

TypeScript 99.71% JavaScript 0.29%
typescript learning-by-doing educational-materials typescript-book

typescript-deep-dive's Introduction

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 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 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.

typescript-deep-dive's People

Contributors

cedrickchee avatar dependabot[bot] avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.