ethanniser / beth-b2b-saas

147 stars 31 forks source link

chore: refactor + add typesafety to libsql client options map #3

Closed jesse-holden closed 1 year ago

jesse-holden commented 1 year ago

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.

ethanniser commented 1 year ago

thank you for this

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