Prefer arrow functions and callbacks (#1210)

This commit is contained in:
Lipis
2020-05-20 16:21:37 +03:00
committed by GitHub
parent 33fe223b5d
commit c427aa3cce
64 changed files with 784 additions and 847 deletions

View File

@@ -8,14 +8,14 @@
* @param {Number} height The height of the rectangle
* @param {Number} radius The corner radius
*/
export function roundRect(
export const roundRect = (
context: CanvasRenderingContext2D,
x: number,
y: number,
width: number,
height: number,
radius: number,
) {
) => {
context.beginPath();
context.moveTo(x + radius, y);
context.lineTo(x + width - radius, y);
@@ -34,4 +34,4 @@ export function roundRect(
context.closePath();
context.fill();
context.stroke();
}
};