TypeScript 2.1 adds support for object rest and spread. You can work with rest/spread properties in a type-safe manner and downlevel both features to ES3.
Posts in 2016
TypeScript 2.1 adds a compiler option for importing helper functions from an external library. The helpers aren't injected into every file, resulting in smaller bundle sizes.
TypeScript 2.1 adds support for downleveling asynchronous functions to ES3/ES5. That way, you can run your
In TypeScript, there are multiple syntaxes for typing a function: method signatures, function type literals, and object type literals with call or construct signatures.
TypeScript 2.0 adds a "lib" compiler option that gives you more granular control over which built-in API declarations to include in your project.
TypeScript 2.0 introduces a new primitive type called "never", the type of values that never occur. It helps model the completion behavior of functions more accurately.
TypeScript 2.0 introduces more literal types. In addition to string literal types, we can now declare boolean, numeric, and enum literal types.
TypeScript 2.0 implements tagged union types, a special kind of union types that share a common property. Here's how you can use them in practice.
In TypeScript 2.0, the
readonly modifier was added to the language. It provides compile-time checking for unintended property assignments.
I'm excited to announce TypeScript Weekly, a weekly e-mail round-up of news and articles from the TypeScript community.
TypeScript 2.0 implements control flow based type analysis to determine the most specific type for a variable or parameter at any given location. An explanation.
TypeScript 2.0 adds support for non-nullable types, which help prevent an entire category of nullability errors at compile-time.
TypeScript allows us to specify multiple types for the same function. That way, we can accurately describe all possible overloads to the type system.
A simple piece of ASP.NET Core middleware lets you simulate network latency to get a much better feeling for your web application's performance in production.
This post describes how I use a custom
RouteNames class together with
UrlHelper.RouteUrl to generate route URLs in ASP.NET Core MVC.
Authentication cookies have to be protected well. Here's how to only send them over HTTPS using the ASP.NET Core cookie authentication middleware.
TypeScript can now independently transpile module formats and language targets. This way, Rollup can bundle ES2015 modules with ES5 code.
The destructuring syntax introduced by ECMAScript 2015 doesn't have to be used to declare new local variables. Plain assignments are supported, too.
Visual Studio Code lets you specify which TypeScript version to use for tooling. Here's how to install a nightly build of TypeScript within a workspace.
TypeScript uses the
The logical operators
ASP.NET Core exposes an application's web and content root paths through the
IHostingEnvironment service, which is available via the built-in dependency injection system.
Using a custom convention, the
Date instances by default.
TypeScript 1.8 introduced string literal types, which allow for describing a set of possible string values for a given variable. Here's how to use them.
ASP.NET Core MVC allows developers to specify inline route constraints directly within route templates. Finally, inline route constraints are no longer restricted to attribute routing!
The Chrome Developer Tools let you store values logged to the console as global variables for further debugging. Super handy from time to time!
Here's how to remove the yellow background that WebKit and Blink add when autofilling a value into a text field.
Dracula is a dark theme for many editors, IDEs, terminals, and other applications. It looks bloody good!
This post gives you some suggestions as to how to get started using the new ECMAScript 2015 features in your projects.
ECMAScript 5 introduced many useful array methods. Two lesser known of them,
every(), are explained in this post.
Array.prototype.includes method will be included in the upcoming ECMAScript 2016 specification. Here's how it works.