Tag: TypeScript


Type safe JSON parsing

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 […]


Typescript decorators

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 […]


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 […]

Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/html/pl/wp-content/themes/sparkbit/index.php on line 77