サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
ノーベル賞
effectivetypescript.com
In most programming languages a variable has a type and that type does not change. But one of the most interesting aspects of TypeScript's type system is that a symbol has a type at a location. Various control flow constructs can change this type: function refine(x: string | number) { // type of x is string | number here if (typeof x === 'number') { // type of x is number here. } else { // type of
Here's something that makes me feel old: in just six months, Gmail will celebrate its 20th anniversary. If you weren't actively developing web sites at the time, it's hard to capture just how revolutionary it was. This was a time when JavaScript was held in almost universally low regard. The idea that you could build a sophisticated web app using it was mind-boggling. But it clearly worked and it
Readers of Effective TypeScript and followers of this blog will know that testing types is a long-standing interest of mine: typings-checker (2017) implemented $ExpectType and $ExpectError directives and helped to influence dtslint, which is used to test types on DefinitelyTyped. I gave a talk at TSConf 2019 entitled Testing Types: An Introduction to dtslint. I included Item 52: Be Aware of the Pi
Software engineering is a battle against complexity. Without any planning or care, it's easy to build programs where everything interacts with everything else (the "big ball of yarn" model). With a ball of yarn, if you double the number of components, you quadruple the number of interactions: One of the best ways to fight against this ramp-up of complexity is to simply reduce N, i.e. to write fewe
TypeScript is a typed superset of JavaScript with the potential to solve many of the headaches for which JavaScript is famous. But TypeScript has a learning curve of its own, and understanding how to use it effectively can take time. Effective TypeScript (2nd Edition) guides you through 83 specific ways to improve your use of TypeScript, following the format popularized by Effective C++ and Effect
The New TypeScript Handbook has some real gems in it. Here's what it has to say about generics: Writing generic functions is fun, and it can be easy to get carried away with type parameters. Having too many type parameters or using constraints where they aren't needed can make inference less successful, frustrating callers of your function. It goes on to offer a few specific pieces of advice about
このページを最初にブックマークしてみませんか?
『Effective TypeScript › 83 Specific Ways to Improve Your TypeScript』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く