Skip to content

Commit

Permalink
fix: type define of createSegment
Browse files Browse the repository at this point in the history
  • Loading branch information
bubkoo committed Mar 3, 2020
1 parent bd8e944 commit 3df2e93
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/x6/src/geometry/path/path.ts
Expand Up @@ -1154,10 +1154,20 @@ export namespace Path {
): Segment
export function createSegment(
type: 'C',
...args: GetConstructorArgs<typeof CurveTo>
x0: number,
y0: number,
x1: number,
y1: number,
x2: number,
y2: number,
): Segment
export function createSegment(
type: 'C',
p1: Point | Point.PointLike | Point.PointData,
p2: Point | Point.PointLike | Point.PointData,
p3: Point | Point.PointLike | Point.PointData,
): Segment
export function createSegment(type: 'Z' | 'z'): Segment

export function createSegment(
type: 'L' | 'M' | 'C' | 'Z' | 'z',
...args: any[]
Expand Down

0 comments on commit 3df2e93

Please sign in to comment.