BärnerJS Talk #3 2019

Publiziert am 19 September 2019 unter Bärner JS Talks, News, Angular von Ilona

 

Achtung der neue Termin ist der 8. Oktober!

 

Advanced Union Types in TypeScript

When programming how often do you have a variable that could have more than one possible type or structure?

It could be more often than you think!

A simple example is a variable that either holds data or does not (e.g. a nullable type).

A more advanced example is the status of an API call, which could be:

• ‘Loading’

• ‘Success’ (with a API result data structure)

• ‘Error’ (with an Error detail data structure)

A type that can have more than one type of structure is a Union Type.

What’s the best way to handle union types? How can use union types in a TypeScript to ensure strict type safety thus giving us a stronger guarantee that our code is correct?

This talk will introduce Union Types, explain the building blocks that are required to work efficiently and safely with unions, and then introduce a couple of libraries which provide us with convenience and consistency when declaring and using union types.

An (intended) side-effect of this talk might the planting of a seed of interest in the world of Functional Programming (although union types are perfectly valid outside of this paradigm).

 

Wayne is a co-founder and developer at Lambda IT with a particular interest in exploring programming paradigms which assist in ensuring code quality.

 

-------------------------------------------------------------------------------

10 things every Angular Developer should know about zone.js

Zone.js is a library which is used in Angular to handle change detection. Most of the time it works really well - however if problems with zone.js occur, dealing with them can be a really frustrating experience. In this talk I want to share helpful things that I learned while deep-diving into zone.js and show you some problems you can run into and how to deal with them.

 

Matthias Junker (Software Catering, https://twitter.com/matt_junker) works a as Frontend Architect at "die Mobiliar".