👊 First post for 2021!
Recently I decided to adopt fp-ts lib on a side project.
What is F p-ts ?
It’s a library that provides abstractions from typed functional languages that makes it easy to apply functional patterns when developing in TypeScript.
My motivation in adopting fp-ts was:
I’ve been reading the fp-ts docs and posts for a while so what was left is to pick a simple side project code, generalise it a bit and start using fp-ts :)
I picked a simple procedure I have that fetches data I manage in google-sheets tables as follows:
Note: following recipes are super useful 📓
Let’s review the fetchTable function sig:
function fetchTable<T>(sheets: Sheets, range: any, spreadsheetId: any): Promise<T>
#javascript #typescript #software-development