Essential TypeScript
Free!
With Membership
$15.00
Suggested price

Essential TypeScript

It's JavaScript... only better.

About the Book

JavaScript is old and its dynamic nature can make it very difficult to build large applications in a maintainable way.  But, add the immense power of compile-type static typing and all of the sudden you've got an enterprise-ready language that saves you from many common JavaScript issues and actually makes web development an enjoyable experience.  TypeScript is a superset of JavaScript - completely compatible in every way, yet it brings the language to a whole new level.

JavaScript is the defacto language of the world.  TypeScript is JavaScript, only better.

Join experienced coder, Jess Chadwick, as he explores the world of TypeScript.  Starting with the basics and fundamental ECMAScript 2015 features that TypeScript expands upon, Jess shows you all the ways that TypeScript allows you to bring your JavaScript development to the next level.

Your feedback is important! 

You are welcome to choose to pay any amount you wish in order to access this book.  If you choose not to pay anything, please repay me with your feedback. I would love a testimontial or to hear your comments, suggestions, and criticisms.  Even better: if there is a change you'd like to see, clone the GitHub repository, make the changes yourself, and submit a pull request.  I will recognize anyone who provides constructive feedback or changes on a special"Contributors" page in the book itself.

  • Share this book

  • Categories

    • JavaScript
    • Computers and Programming
    • ES6
    • ASP.NET
    • HTML
    • TypeScript
  • Feedback

    Email the Author(s)

About the Author

Jess Chadwick
Jess Chadwick

Jess Chadwick is a software developer and technologist with over fifteen years of development experience ranging from embedded devices in start-ups to enterprise-scale solutions in Fortune 25s. He is the host of The Static Void Podcast, an ASPInsider and a magazine and book author with O’Reilly publishing, as well as several courses on Lynda.com including TypeScript Essentials and Up and Running with ASP.NET 5. Jess is actively involved in the development community, regularly speaking at user groups and conferences as well as co-lead of the NJDOTNET Central New Jersey .NET user group.

Table of Contents

  • 1. Preface
    • What You Should Know
    • Source Code Examples
    • Errors, Omissions, and Contributions
  • 2. Introduction
    • What is TypeScript?
    • Defining “JavaScript”
    • Writing your first TypeScript function
  • 3. Getting Started
    • Choosing your TypeScript editor
    • Installing TypeScript in Visual Studio
    • Installing the TypeScript Command Line Interface
    • Configuring the TypeScript compiler
  • 4. ECMAScript 2015 Features
    • Optional Parameters
    • Template Strings
    • Let and const
    • For..of Loops
    • Arrow Functions
    • Destructuring
    • The Spread Operator
    • Computed Properties
  • 5. Type Fundamentals
    • Introducing JavaScript Types
    • Understanding Type Inference
    • Specifying JavaScript Types
    • Union Types
    • Function Overloads
  • 6. Custom Types
    • Defining custom types with Interfaces
    • Using interfaces to describe functions
    • Extending interface definitions
    • Defining constant values with enums
    • Anonymous Types
    • Using interfaces to dynamically access object properties
  • 7. Classes
    • Understanding Prototypical Inheritance
    • Defining a class
    • Applying static properties
    • Making properties smarter with accessors
    • Inheriting behavior from a base class
    • Implementing an abstract class
    • Controlling visibility with access modifiers
    • Implementing interfaces
  • 8. Generics
    • Creating generic functions
    • Creating generic classes
    • Creating generic constraints
  • 9. Modules
    • Organizing Your Code with Namespaces
    • Using namespaces to encapsulate private members
    • Understanding the difference between Internal and External Modules
    • Switching from internal to external modules
    • Importing modules using Require syntax
    • Importing modules using ECMAScript 2015 syntax
    • Loading External Modules
  • 10. Real-World Application Development
    • Converting existing JavaScript code to TypeScript
    • Generating Declaration Files
    • Referencing third-party libraries
    • Converting to External Modules
    • Debugging TypeScript with source maps
  • 11. Decorators
    • Implementing Class Decorators
    • Implementing Property Decorators
    • Implementing Decorator Factories
  • 12. Appendix: Syntax Examples
    • ECMAScript 6 Features
    • Custom Types

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

80% Royalties. Earn $16 on a $20 book.

We pay 80% royalties. That's not a typo: you earn $16 on a $20 sale. If we sell 5000 non-refunded copies of your book or course for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earnedover $13 millionwriting, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub