Creating LocalStorage Wrapper With TypeScript

Improve the usage of browser APIs by adding a custom wrapper

Oleh Zaporozhets
Better Programming
Published in
3 min readNov 16, 2020

--

Code on a laptop
Photo by Christopher Gower on Unsplash.

Today’s article will be useful for front-end developers who want their code to be type-safe and more readable. I would like to show you how you can wrap different browser APIs to have better control of the situation. For instance, I will use localStorage.

--

--