没有合适的资源?快使用搜索试试~ 我知道了~
TypeScript Revealed.pdf
需积分: 9 16 下载量 102 浏览量
2017-09-17
20:12:24
上传
评论
收藏 1.31MB PDF 举报
温馨提示
试读
95页
TypeScript 简明教程 TypeScript 简明教程 TypeScript 简明教程 TypeScript 简明教程 TypeScript 简明教程TypeScript 简明教程TypeScript 简明教程
资源推荐
资源详情
资源评论
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
Download from Wow! eBook <www.wowebook.com>
v
Contents at a Glance
About the Author ������������������������������������������������������������������������������ xi
About the Technical Reviewer �������������������������������������������������������� xiii
Acknowledgments ��������������������������������������������������������������������������� xv
Introduction ����������������������������������������������������������������������������������� xvii
Chapter 1: Getting Up to Speed with TypeScript ■ ����������������������������� 1
Chapter 2: The New Syntax ■ ���������������������������������������������������������� 27
Chapter 3: Working with TypeScript ■ ��������������������������������������������� 61
Appendix A: Webliography ■ ������������������������������������������������������������ 77
Index ������������������������������������������������������������������������������������������������ 81
xvii
Introduction
Anders Hejlsberg has a lot to answer for. Perhaps not as well known as Bjarne Stroustrup
(C++) or Dennis Ritchie (C), he’s responsible for the creation of Turbo Pascal, Delphi,
J++, and C#. And, as the creator of the language that the majority of .NET developers
have been using for the past ten years, it is fair to say that he knows a fair bit about
language design.
October 1, 2012 heralded the start of the journey for another Hejlsberg creation.
TypeScript is a superset of JavaScript that brings to it an additional object-oriented-like
syntax familiar to .NET programmers that compiles down into JavaScript that any browser
can run today. As I write this three weeks since its announcement, it’s interesting to see
how, with hindsight, the loudest reactions have been, “Why do we need this?” or “Not
in my backyard,” and so on—the naysayers getting their dimes’ worth before this Friday,
when Windows 8 is ocially launched and they can copy and paste the same reactions
back into their slightly revised pieces about the new touch interface that isn’t called
Metro. Now that the dust has settled, my personal favorite response to all the initial
negativity was simply, “But this is Anders.”
TypeScript is an interesting project, considering the forces that will work at it and the
target at which it is aimed.
Its mission statement is “JavaScript for application-scale •
development.”
It’s an open source project, so there’s direct input from its users.•
It’s a standard in its own right.•
It’s a proof of concept for, and therefore will/should react to, parts •
of the ECMAScript 6 standard.
It’s inevitably a well-timed boost for the development of Windows 8 applications
using HTML and JavaScript rather than C# and XAML, or a hybrid approach between the
two for lack of JavaScript structure.
How TypeScript is allowed to evolve will be interesting. In the meantime, we have
the initial v0.8.x releases that this book targets. It covers the following:
e language features in TypeScript additional to those in •
JavaScript
e tooling and community support for TypeScript development•
How TypeScript can be included in ASP.NET, and Windows 8 •
application development projects
xviii
■ IntroduCtIon
Who Is This Book For?
is book is for .NET and JavaScript developers who want to get a head start
incorporating TypeScript into their applications. I explain the tools and language features
you need to get up to speed quickly and also the current, soon to be ex-limitations of
TypeScript as it makes its way toward a version 1.0 release.
What Do You Need to Know Before You
Read This Book?
You need a good knowledge of an object-oriented language such as C#, ideally from
creating ASP.NET web applications or Windows 8 applications. TypeScript tooling is, in
the main, based on Visual Studio, so a familiarity with that would also be good.
You also need a basic familiarity with JavaScript, but advanced JavaScript skills are
not necessary.
What Software Do You Need for This Book?
Technically, you don’t need anything more than a text editor such as Notepad to write
TypeScript applications. However, to take full advantage of the tooling that exists, you’ll
need a copy of a non-Express version of Visual Studio 2012. If you don’t have access to
that, there is support for Visual Studio 2012 Express for Web and also for Sublime Text 2,
Vim, and eMacs, which are all free downloads.
You’ll learn where to download and how to install TypeScript in Chapter 1.
What Is the Structure of the Book?
is is a primer to get you started on TypeScript. As TypeScript is at such an early stage in
its adoption and development, this book does not aim to be a comprehensive tutorial and
focuses instead on the three key topics that you’ll need to consider in order to determine
whether you’ll want to start using TypeScript now, and if so, how to do it:
Chapter 1: Getting Up to Speed with TypeScript•
Just exactly what is TypeScript, and how does it t in to your
projects? In this chapter, you’ll look at the aims of TypeScript,
how it compares to its perceived competition, and what
exactly it does and does not do. You’ll also see how to install
it, what you get, and how to run through creating a simple
TypeScript-based page.
剩余94页未读,继续阅读
资源评论
lukie2
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功