Git Product home page Git Product logo

typescript-tutorial's Introduction

TypeScript 速成教程

根据官方语言规范描述:TypeScript 的语法是 ECMAScript 2015 (后面统称ES6) 语法的超集,这种说法不完全准确,比方说对于来自ES7asyncawait语法TypeScript也提供了语言支持。

TypeScript完全兼容“ES6+”, 也就是说学习TypeScript的时候,无需纠结语言特性到底是来自ES6ES7、还是ESNextbabel编译器所支持的语言特性,TypeScript绝大部分都原生支持。

简单点说:TypeScript是一种扩展自ES6的语言,ES6的所有语法都被TypeScript原生支持。因而本教程不会讲解ES6或者ES6+的知识点,作为TypeScript语言的基础,请务必优先自行掌握 ES6

如何学习本教程

本教程以快速工程实践为目标,旨在让读者速成,能够迅速的GET到语言的核心知识点,并付诸实践!

本质上讲,语言始终是一种改进生产力的工具。陌生使用者最迫切的需求理应是快速掌握工具的使用,而不是在连工具都没学会使用的时候,却已经沉迷于工具的细枝末叶,奇技淫巧。真正的所谓熟练:应该是“在实践中大量使用、在实践中踩坑、以及在实践中理解”的过程中自然形成的。

学习是一个强迫自律的过程,终究是痛苦的,无论时间多短。本教程最初设定阅读时长2小时全部读完,后来发现很多内容已经很难加进去了,新版本不容易迭代,因而在最新的版本中将移除此设定,但也会努力做到:这将是目前最容易学会耗时最短的TypeScript教程!

切记:不要钻牛角尖,更不要纠结于咬文嚼字

编译器版本

目前所有示例都通过了 tsc 编译器版本 Version 3.6.2 编译,可自行验证。如果发现了错误,请提交Issue,以防对他人造成误导

目录

1、类型

2、泛型

3、类型转换

4、模块

5、命名空间

6、理解声明

typescript-tutorial's People

Contributors

joye61 avatar

Watchers

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