Skip to content

Commit

Permalink
Correct return types for relevant jCanvas methods
Browse files Browse the repository at this point in the history
  • Loading branch information
caleb531 committed Jun 12, 2024
1 parent e4b33b3 commit 12d34b4
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/jcanvas.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,28 +238,28 @@ interface JQuery {
addLayerToGroup(layerId: JCanvasLayerId, groupName: string): JQuery;
removeLayerFromGroup(layerId: JCanvasLayerId, groupName: string): JQuery;
triggerLayerEvent(layerId: JCanvasLayerId, eventType: string): JQuery;
drawLayer(layerId: JCanvasLayerId, groupName: string): void;
drawLayer(layerId: JCanvasLayerId, groupName: string): JQuery;
drawLayers(args?: {
clear?: boolean;
resetFire?: boolean;
index?: number;
complete?: () => void;
}): void;
addLayer(args: Partial<JCanvasObject>): void;
}): JQuery;
addLayer(args: Partial<JCanvasObject>): JQuery;
animateLayer(
layerId: JCanvasLayerId,
props: Partial<JCanvasAnimatableProps>,
...args: any[]
): void;
): JQuery;
animateLayerGroup(
groupId: jCanvasLayerGroupId,
props: Partial<JCanvasObject>,
...args: any[]
): void;
delayLayer(layerId: JCanvasLayerId, duration: number): void;
delayLayerGroup(groupId: jCanvasLayerGroupId, duration: number): void;
stopLayer(layerId: JCanvasLayerId, clearQueue?: boolean): void;
stopLayerGroup(groupId: jCanvasLayerGroupId, clearQueue?: boolean): void;
): JQuery;
delayLayer(layerId: JCanvasLayerId, duration: number): JQuery;
delayLayerGroup(groupId: jCanvasLayerGroupId, duration: number): JQuery;
stopLayer(layerId: JCanvasLayerId, clearQueue?: boolean): JQuery;
stopLayerGroup(groupId: jCanvasLayerGroupId, clearQueue?: boolean): JQuery;
draw(args: Partial<JCanvasObject>): JQuery;
clearCanvas(args?: Partial<JCanvasObject>): JQuery;
saveCanvas(args?: Partial<JCanvasObject>): JQuery;
Expand All @@ -282,7 +282,7 @@ interface JQuery {
drawImage(args: Partial<JCanvasObject>): JQuery;
createPattern(args: Partial<JCanvasObject>): CanvasPattern | null;
createGradient(args: Partial<JCanvasObject>): CanvasGradient | null;
setPixels(args: Partial<JCanvasObject>): void;
setPixels(args: Partial<JCanvasObject>): JQuery;
getCanvasImage(type: string, quality?: number): string | null;
detectPixelRatio(callback?: (ratio: number) => void): JQuery;
}
Expand Down

0 comments on commit 12d34b4

Please sign in to comment.