interface A
{
x:string; y:string
};
var a: A[] = [];
a.push(
{x: "a",
y: "b"});
a.slice(-1).x = "foo";
That last line gets an error I think because the result of a.slice(-1) is not of a known type, so it says "no known property x".
- Is my diagnosis correct?
- What's the right way to do that?