From a0fa31362f2bc6c29b1752dfa641d03a0bb6de8f Mon Sep 17 00:00:00 2001 From: Santi Albo Date: Wed, 2 Aug 2017 20:39:36 +0200 Subject: [PATCH] [paper] Correct return type for `Rectangle.scale` and `Rectangle.expand` (#18578) The definition for both methods returned void although they return a new Rectangle instance. See https://github.com/paperjs/paper.js/blob/c403c86a23f54f07bb7e9448c7f05df5cebb464c/src/basic/Rectangle.js#L805-L833 --- types/paper/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/types/paper/index.d.ts b/types/paper/index.d.ts index 45f1ac590f..bce11df130 100644 --- a/types/paper/index.d.ts +++ b/types/paper/index.d.ts @@ -793,27 +793,27 @@ declare module 'paper' { * Expands the rectangle by the specified amount in horizontal and vertical directions. * @param amount - the amount to expand the rectangle in both directions */ - expand(amount: number | Size | Point): void; + expand(amount: number | Size | Point): Rectangle; /** * Expands the rectangle by the specified amounts in horizontal and vertical directions. * @param hor - the amount to expand the rectangle in horizontal direction * @param ver - the amount to expand the rectangle in vertical direction */ - expand(hor: number, ver: number): void; + expand(hor: number, ver: number): Rectangle; /** * Scales the rectangle by the specified amount from its center. * @param amount - the amount to scale by */ - scale(amount: number): void; + scale(amount: number): Rectangle; /** * Scales the rectangle in horizontal direction by the specified hor amount and in vertical direction by the specified ver amount from its center. * @param hor - the amount to scale the rectangle in horizontal direction * @param ver - the amount to scale the rectangle in vertical direction */ - scale(hor: number, ver: number): void; + scale(hor: number, ver: number): Rectangle; } /**