Why isn't this typescript type working? - Theo's Typesafe Cult