icon-search

Tag: TypeScript

11.01.2017

Type safe JSON parsing

markus-spiske-445253-unsplash

Introduction Problems with JSON payloads A common problem when developing applications talking to external services are payloads that do not stick to the contract. When we build a typescript application consuming JSON endpoints the easiest thing to do (shown in most tutorials) is casting the payload to the expected type. This can however lead to […]

28.11.2016

Typescript decorators

jason-leung-330341-unsplash

Decorators are a proposed standard in ECMAScript2016. In Typescript we can enable them by setting the “experimentalDecorators” compiler flag. Decorators are a mechanism for modifying classes in a declarative fashion. If you come from a Java background they might look to you just like java annotations. They can be used for all the purposes runtime […]

13.10.2016

Static typing in Angular 2

static typing

Angular 2 applications can be written both in Typescript and in plain old Javascript. This means we have an important choice to make: whether to go with static typing or choose the dynamically-typed path. At Sparkbit, we chose static typing and in this article we explain what it is and what the benefits of such […]