While if you only were dealing with data, you could just do a cast to an interface (as it’s purely a compile time structure), this would require that you use a TypeScript class which uses the data instance and performs operations with that data.
Some examples of copying the data:
- Copying AJAX JSON object into existing Object
In essence, you’d just :
var d = new MyRichObject(); d.copyInto(jsonResult);