MasteringTypeScript - (EPUB全文下载)

文件大小:4.37 mb。
文件格式:epub 格式。
书籍内容:

Mastering TypeScript
Table of Contents
Mastering TypeScript
Credits
About the Author
Acknowledgement
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. TypeScript – Tools and Framework Options
What is TypeScript?
EcmaScript
The benefits of TypeScript
Compiling
Strong Typing
TypeScript's "syntactic sugar"
Type definitions for popular JavaScript libraries
Definitely Typed
Encapsulation
TypeScript classes generate closures
Public and private accessors
TypeScript IDEs
Visual Studio 2013
Creating a Visual Studio Project
Default project settings
Debugging in Visual Studio
WebStorm
Creating a WebStorm project
Default files
Running the web page in Chrome
Debugging in Chrome
Brackets
Installing Brackets
Creating a Brackets project
Using Brackets live preview
Creating a TypeScript file
Compiling our TypeScript
Using Grunt
Debugging in Chrome
Summary
2. Types, Variables and Function Techniques
Basic types
JavaScript is not strongly typed
TypeScript is strongly typed
Type syntax
Inferred typing
Duck-typing
Arrays
The any type
Explicit casting
Enums
Const enums
Functions
Anonymous functions
Optional parameters
Default parameters
The arguments variable
Function callbacks
Function signatures
Function callbacks and scope
Function overloads
Union types
Type guards
Type aliases
Summary
3. Interfaces, Classes and Generics
Interfaces
Classes
Class constructors
Class functions
Interface function definitions
Inheritance
Interface inheritance
Class inheritance
Function and constructor overloading with super
JavaScript closures
The Factory Design Pattern
Business requirements
What the Factory Design Pattern does
The IPerson interface and the Person base class
Specialist classes
The Factory class
Using the Factory class
Class modifiers
Constructor access modifiers
Class property accessors
Static functions
Static properties
Generics
Generic syntax
Instantiating generic classes
Using the type T
Constraining the type of T
Generic interfaces
Creating new objects within generics
Runtime type checking
Reflection
Checking an object for a function
Interface checking with generics
Summary
4. Writing and Using Declaration Files
Global variables
Using JavaScript code blocks in HTML
Struc ............

书籍插图:
书籍《MasteringTypeScript》 - 插图1
书籍《MasteringTypeScript》 - 插图2

以上为书籍内容预览,如需阅读全文内容请下载EPUB源文件,祝您阅读愉快。

版权声明:书云(openelib.org)是世界上最大的在线非盈利图书馆之一,致力于让每个人都能便捷地了解我们的文明。我们尊重著作者的知识产权,如您认为书云侵犯了您的合法权益,请参考版权保护声明,通过邮件openelib@outlook.com联系我们,我们将及时处理您的合理请求。 数研咨询 流芳阁 研报之家 AI应用导航 研报之家
书云 Open E-Library » MasteringTypeScript - (EPUB全文下载)