随笔分类 -  TypeScript

摘要:(binary search trees) which form the basis of modern databases and immutable data structures. Binary search works very much the way humans intuitively 阅读全文
posted @ 2017-07-21 20:05 Zhentiw 阅读(293) 评论(0) 推荐(0)
摘要:You can easily use TypeStyle to build static html files with encapsulated CSS. You can use this pattern to generate email and pdf template files. Sinc 阅读全文
posted @ 2017-06-09 15:37 Zhentiw 阅读(241) 评论(0) 推荐(0)
摘要:You can increase the browser support of your CSS using fallback values and vendor prefixes. This lesson covers using vendor prefixes and fallback valu 阅读全文
posted @ 2017-06-08 04:22 Zhentiw 阅读(236) 评论(0) 推荐(0)
摘要:TypeStyle tries to be an all in one CSS in JS management solution so you can always fall back to raw CSS if you ever need to migrate old code quickly. 阅读全文
posted @ 2017-06-07 02:27 Zhentiw 阅读(242) 评论(0) 推荐(0)
摘要:We cover CSS keyframes and how to create them using TypeStyle. We then show how to use the keyframes function to create an animation. We also discuss 阅读全文
posted @ 2017-06-07 02:08 Zhentiw 阅读(436) 评论(0) 推荐(0)
摘要:We will demonstrate composing classes using the utility classes function. classes is also what we recommend for theming. Using pure CSS classes means 阅读全文
posted @ 2017-06-06 14:44 Zhentiw 阅读(267) 评论(0) 推荐(0)
摘要:Just like pseudo-classes, pseudo-elements are added to selectors but instead of describing a special state, they allow you to style certain parts of a 阅读全文
posted @ 2017-06-05 19:02 Zhentiw 阅读(294) 评论(0) 推荐(0)
摘要:TypeStyle is a very thin layer on top of CSS. In this lesson we show how to change styles based on pseudo classes e.g. :focus :hover and :active which 阅读全文
posted @ 2017-06-05 18:54 Zhentiw 阅读(398) 评论(0) 推荐(0)
摘要:Media queries are very important for designs that you want to work on both mobile and desktop browsers. TypeStyle gives media queries special attentio 阅读全文
posted @ 2017-06-05 18:30 Zhentiw 阅读(361) 评论(0) 推荐(0)
摘要:TypeStyle’s style function allows you to give multiple objects as an argument. This provides a simple extensible reuse-ability model. We cover typesty 阅读全文
posted @ 2017-06-05 18:17 Zhentiw 阅读(253) 评论(0) 推荐(0)
摘要:TypeStyle is the only current CSS in JS solution that is designed with TypeSafety and TypeScript developer ergonomics in mind. In this lesson we will 阅读全文
posted @ 2017-06-05 18:12 Zhentiw 阅读(258) 评论(0) 推荐(0)
摘要:Lookup types, introduced in TypeScript 2.1, allow us to dynamically create types based on the property keys of an object. We'll use the function spyOn 阅读全文
posted @ 2017-05-24 14:46 Zhentiw 阅读(232) 评论(0) 推荐(0)
摘要:Learn how to create random integers using JavaScript / TypeScript. 阅读全文
posted @ 2017-05-01 22:56 Zhentiw 阅读(474) 评论(0) 推荐(0)
摘要:Say you have an array that has at least one item repeated. How would you find the repeated item. This is a question commonly presented to beginner dev 阅读全文
posted @ 2017-04-28 02:45 Zhentiw 阅读(227) 评论(0) 推荐(0)
摘要:In this lesson we cover the key reason why programming languages need generics. We then show how use them effectively with TypeScript. We show plenty 阅读全文
posted @ 2017-04-18 20:27 Zhentiw 阅读(227) 评论(0) 推荐(0)
摘要:In this lesson we cover all the details of how to sort a list of items using TypeScript. We also present a few tricks to make your sort logic more rea 阅读全文
posted @ 2017-03-30 03:06 Zhentiw 阅读(748) 评论(0) 推荐(0)
摘要:TypeScript is very particular about what is and isn't allowed in a TS file to protect you from common developer errors. By default if you set the comp 阅读全文
posted @ 2017-03-17 21:32 Zhentiw 阅读(622) 评论(0) 推荐(0)
摘要:You can create an easy to chain API using TypeScript classes. Learn about the thisreturn type annotation and how it plays with function chaining and c 阅读全文
posted @ 2017-03-09 01:38 Zhentiw 阅读(256) 评论(0) 推荐(0)
摘要:TypeScript has 'interface' and 'type', so when to use which? It is recommended that to use 'interface' to define the props that obj should have. 'type 阅读全文
posted @ 2017-03-06 19:48 Zhentiw 阅读(206) 评论(0) 推荐(0)
摘要:For example you have a TS app: The problem for this piece of code is that, you can assign 'kobe' to null, or undefined. And compiler won't catch this 阅读全文
posted @ 2017-03-06 17:16 Zhentiw 阅读(257) 评论(0) 推荐(0)