Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Typescript definition for settings points on a link

$
0
0

@Dominic.Lerbs wrote:

I try to set some points on a link as described in the documentation:

The setter also accepts an Array of alternating X,Y point values [1, 2, 3, 4, 5, 6], or an Array of Objects each of which has (lowercase) ‘x’ and ‘y’ properties that are numbers [{“x”:1,“y”:2}, {“x”:3,“y”:4}, {“x”:5,“y”:6}].

link.points = [4, 5, 122, 44, 333, 44];

However, this doesn’t work:
Type 'number[]' is missing the following properties from type 'List<Point>': add, addAll, clear, contains, and 23 more.

I think the TypeScript definition could be improved here, couldn’t it?

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles