随笔分类 -  TypeScript

上一页 1 ··· 26 27 28 29 30
摘要:Using TypeScript when installing packages from npm often requires you to install related definition files. This lesson shows you how to use typings to 阅读全文
posted @ 2016-06-10 03:22 Zhentiw 阅读(291) 评论(0) 推荐(0)
摘要:One of the most confusing parts of getting started with TypeScript is figuring out how to use all the libraries that you know and love from JavaScript 阅读全文
posted @ 2016-06-10 02:14 Zhentiw 阅读(2286) 评论(0) 推荐(0)
摘要:This lesson covers using your first TypeScript Interface and what happens to the Interface when it is compiled down to JavaScript. Define the interfac 阅读全文
posted @ 2016-06-10 01:59 Zhentiw 阅读(118) 评论(0) 推荐(0)
摘要:Files globs will be available in TypeScript 2.0, so in the meantime, we need to use "exclude" and "rootDir" to configure which files to load. This les 阅读全文
posted @ 2016-06-09 04:39 Zhentiw 阅读(277) 评论(0) 推荐(0)
摘要:TypeScript will always compile even if there are ridiculous errors in your project. This lesson shows how to configure your .tsconfig with "noEmitOnEr 阅读全文
posted @ 2016-06-09 04:17 Zhentiw 阅读(184) 评论(0) 推荐(0)
摘要:This lesson shows how to configure the .tsconfig so you only compile the .ts files you want. It then shows how to configure which directory you'd like 阅读全文
posted @ 2016-06-09 02:25 Zhentiw 阅读(387) 评论(0) 推荐(0)
摘要:This lesson walks you through creating your first .tsconfig configuration file which will tell the TypeScript compiler how to treat your .ts files. In 阅读全文
posted @ 2016-06-09 02:06 Zhentiw 阅读(309) 评论(0) 推荐(0)
摘要:This lesson shows you how to install TypeScript and run the TypeScript compiler against a .ts file from the command line. install: app.ts: RUN: You wi 阅读全文
posted @ 2016-06-09 01:47 Zhentiw 阅读(266) 评论(0) 推荐(0)
摘要:Libraries such as RxJS use generics heavily in their definition files to describe how types flow through different interfaces and function calls. We c 阅读全文
posted @ 2016-06-01 18:14 Zhentiw 阅读(569) 评论(0) 推荐(0)
摘要:If Typescript is the first language in which you've encountered generics, the concept can be quite difficult to understand. We skip the lecture in thi 阅读全文
posted @ 2016-04-29 03:47 Zhentiw 阅读(188) 评论(0) 推荐(0)
摘要:Define a function type and params type: 阅读全文
posted @ 2016-04-01 20:38 Zhentiw 阅读(230) 评论(0) 推荐(0)
摘要:Handling state with Typescript enums, instead of booleans, is preferred because:- Enums are more readable- Enums can have as many states as you need w 阅读全文
posted @ 2016-03-25 00:31 Zhentiw
摘要:To avoid using "any" type is a best pratice. The reason for that is it disable the power of typescirpt to helping check you during the compile time. F 阅读全文
posted @ 2016-03-20 05:06 Zhentiw 阅读(198) 评论(0) 推荐(0)
摘要:Inheritance is a way toindicate that a class receives behavior from a parent class. Then we can override, modify or augmentthose behaviors on the new ... 阅读全文
posted @ 2015-11-02 02:43 Zhentiw
摘要:In this unit, we'll look at some of the new features in the latest version of TypeScript 1.4 and talk about why they're important. We'll be covering s... 阅读全文
posted @ 2015-08-17 20:40 Zhentiw
摘要:Package.json:{ "name": "typescript", "version": "1.0.0", "description": "", "main": "index.js", "dependencies": { "gulp": "^3.9.0", "gulp-t... 阅读全文
posted @ 2015-08-17 20:13 Zhentiw
摘要:The TypeScript type system enables programmers to express limits on the capabilities of JavaScript objects, and to use tools that enforce these limits... 阅读全文
posted @ 2015-08-17 19:30 Zhentiw
摘要:The TypeScript compiler is a powerful tool which catches mistakes even in vanilla JavaScript. Try it online at theTypeScript Playground, zero setup re... 阅读全文
posted @ 2015-03-19 16:44 Zhentiw
摘要:Create a greeter.ts file:class Student { fullname : string; constructor(public firstname, public middleinitial, public lastname) { this.f... 阅读全文
posted @ 2015-03-19 16:37 Zhentiw

上一页 1 ··· 26 27 28 29 30