https://javascript.plainenglish.io/mastering-conditional-types-in-typescript-a-practical-guide-3af618771165