From 3df2e93244c9ad47f4fc7095827b59a200b372bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=96=E5=B4=96=E5=B4=96?= Date: Mon, 2 Mar 2020 11:15:32 +0800 Subject: [PATCH] fix: type define of createSegment --- packages/x6/src/geometry/path/path.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/x6/src/geometry/path/path.ts b/packages/x6/src/geometry/path/path.ts index ecd3e557527..cef668f23ad 100644 --- a/packages/x6/src/geometry/path/path.ts +++ b/packages/x6/src/geometry/path/path.ts @@ -1154,10 +1154,20 @@ export namespace Path { ): Segment export function createSegment( type: 'C', - ...args: GetConstructorArgs + 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[]