I have data that looks like this:
var abc = [{ "id": 1, "name": "x" }, { "id": 2, "name": "x" }]
Can someone tell me how I can declare a datatype for this in Typescript ? Can I go so far as to declare that the objects contain and "id" and "name" field?
idand anamestring. One of the things TypeScript got right is that it has structural typing. What have you tried so far and where are you stuck?