Type definitions to retrieve objects from localStorage

If you have ever written an object into localStorage , you most likely have had the nasty surprise that reading it back didn't instantly return a full object with its associated methods. As with all bugs, you swore that it wouldn't happen again, but how many times do we trip over the same stone? I recently decided that the last bug occurrence was one too many and that I would solve this once and…