mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-02 14:38:20 +08:00
[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 c403c86a23/src/basic/Rectangle.js (L805-L833)
This commit is contained in:
committed by
Sheetal Nandi
parent
fc7a45f9ea
commit
a0fa31362f
8
types/paper/index.d.ts
vendored
8
types/paper/index.d.ts
vendored
@@ -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;
|
||||
|
||||
}
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user