typescript

More secure TypeScript code - easily

How to secure JS object returned by API as a correct Typescript type? TS type predicate function helps here. (and it’s not the only way)
Read more

Fetch better than built-in?

Do you fetch your data? Do you use fetch in your projects? I do. But until couple days ago, I didn’t think about return value of fetch. During discussion (in a course on frontend architecture) this issue was mentioned by one of the mentors. Built-in fetch returns Promise<any> Why didn’t anybody use generics for this? I decided to save myself (and others) some time and post the improved fetch as npm package
Read more