随笔分类 - TypeScript
摘要:(binary search trees) which form the basis of modern databases and immutable data structures. Binary search works very much the way humans intuitively
阅读全文
摘要: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
阅读全文
摘要:You can increase the browser support of your CSS using fallback values and vendor prefixes. This lesson covers using vendor prefixes and fallback valu
阅读全文
摘要: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.
阅读全文
摘要: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
阅读全文
摘要:We will demonstrate composing classes using the utility classes function. classes is also what we recommend for theming. Using pure CSS classes means
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:Media queries are very important for designs that you want to work on both mobile and desktop browsers. TypeStyle gives media queries special attentio
阅读全文
摘要:TypeStyle’s style function allows you to give multiple objects as an argument. This provides a simple extensible reuse-ability model. We cover typesty
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要:Learn how to create random integers using JavaScript / TypeScript.
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号