https://medium.com/better-programming/typescript-advanced-types-literal-types-and-discriminated-unions-13139196876c