I would like the proper way to convert an object of type any to an object that conforms to a particular interface, say ApiResponse. The object of type any came from a JSON payload. I would ideally like some proper error handling dealing with this conversion, as well. I have come up with the following approach, but not sure if it's using TypeScript properly or exploiting the best patterns.
