diff --git a/src/Shape.ts b/src/Shape.ts index 879f08a4..5406bec6 100644 --- a/src/Shape.ts +++ b/src/Shape.ts @@ -21,6 +21,9 @@ export type ShapeConfigHandler = { bivarianceHack(ctx: Context, shape: TTarget): void; }['bivarianceHack']; +export type LineJoin = 'round' | 'bevel' | 'miter'; +export type LineCap = 'butt' | 'round' | 'square'; + export interface ShapeConfig extends NodeConfig { fill?: string; fillPatternImage?: HTMLImageElement; @@ -58,8 +61,8 @@ export interface ShapeConfig extends NodeConfig { strokeScaleEnabled?: boolean; strokeHitEnabled?: boolean; strokeEnabled?: boolean; - lineJoin?: string; - lineCap?: string; + lineJoin?: LineJoin; + lineCap?: LineCap; sceneFunc?: (con: Context, shape: Shape) => void; hitFunc?: (con: Context, shape: Shape) => void; shadowColor?: string; @@ -789,8 +792,8 @@ export class Shape extends Node< fillPatternY: GetSet; fillPriority: GetSet; hitFunc: GetSet, this>; - lineCap: GetSet; - lineJoin: GetSet; + lineCap: GetSet; + lineJoin: GetSet; perfectDrawEnabled: GetSet; sceneFunc: GetSet, this>; shadowColor: GetSet;