I want to do a translation of C# code below into TypeScript:
[JsType(JsMode.Json)]
public class position : JsArray<JsNumber>
{
}
[JsType(JsMode.Json)]
public class coordinateArray : JsArray<position>
{
}
[JsType(JsMode.Json)]
public class polygonRings : JsArray<coordinateArray>
{
}
I tried to do it like this:
export interface position {
(): number[];
}
export interface coordinateArray {
(): position[];
}
export interface polygonRings {
(): coordinateArray[];
}
But when I try to cast it I have some problems:
Cannot convert 'coordinateArray' to 'position[]'.
In code:
(<position[]> lineString.coordinates).push(position);