Skip to content

Commit

Permalink
sort imports by module name in TypeScript too, phetsims/chipper#1462
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Kauzmann <[email protected]>
  • Loading branch information
zepumph committed Sep 23, 2024
1 parent a93c75c commit ac16ee2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/Shape.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ type CanApplyParsedSVG = {
// Type of the parsed SVG item that is returned by the parser (from svgPath.js)
type ParsedSVGItem = {
// Turn each method into { cmd: 'methodName', args: [ ... ] }
[ K in keyof CanApplyParsedSVG ]: CanApplyParsedSVG[ K ] extends ( ...args: infer Args ) => Shape ? { cmd: K; args: Args } : never;
[K in keyof CanApplyParsedSVG]: CanApplyParsedSVG[ K ] extends ( ...args: infer Args ) => Shape ? { cmd: K; args: Args } : never;
}[ keyof CanApplyParsedSVG ];

class Shape implements CanApplyParsedSVG {
Expand Down Expand Up @@ -1781,6 +1781,7 @@ class Shape implements CanApplyParsedSVG {
public static rectangle( x: number, y: number, width: number, height: number ): Shape {
return new Shape().rect( x, y, width, height );
}

public static rect = Shape.rectangle;

/**
Expand All @@ -1789,6 +1790,7 @@ class Shape implements CanApplyParsedSVG {
public static roundRect( x: number, y: number, width: number, height: number, arcw: number, arch: number ): Shape {
return new Shape().roundRect( x, y, width, height, arcw, arch );
}

public static roundRectangle = Shape.roundRect;

/**
Expand Down

0 comments on commit ac16ee2

Please sign in to comment.