TypeScript
Introduction to Angular CLI
Introduction In this post we will get familiar Angular CLI. We will go through some examples and see what kind of things we can do with it and how it can make our life easier and save us some time.
Decorators with TypeScript
Introduction JavaScript decorators are a special kind of declaration. Decorators can be attached to both class declaration and class method declaration. Furthermore, they can be attached to accessor and property declaration. Finally, they can also be attached to parameter declaration.
Tuples in TypeScript
Tuples in TypeScript With tuples we can define what type of data (variable type) can be stored in every position ( or few starting positions ) inside of an array. Once you define the tuple you can then use it to declare variables.
Intersection types in TypeScript
Intersection types Purpose of this post is to get a basic understanding of intersection types and realize pros and cons of intersection types. Last time we talked about union types: let x: string | number; Variable x can be either string or a number. Consequently, you can use type guarding technique to exclude one of the types.
TypeScript - Union types, type guards and type aliases
Union types We can use union types in TypeScript to combine multiple types into one type: let text: string | string[]; Variable text can now be either string or string array which can be pretty handy in some particular cases.