I refactored the switch statement into an object map with typesafety added through satisfies. This will now catch errors if new connection types are added to valid env values, but missing from the config map, and also makes sure the returned config is always valid.
this repo I want to keep identical to the video
but please make this exact pr for the template create-beth-app uses here: https://github.com/ethanniser/beth-big
I refactored the switch statement into an object map with typesafety added through
satisfies
. This will now catch errors if new connection types are added to valid env values, but missing from the config map, and also makes sure the returned config is always valid.