setWidth
ts
function Rect.setWidth(rect: Rect, width: number): RectSets the width of the rectangle to the specified value. Negative values are clamped to 0.
Example
ts
Rect.setWidth({ left: 10, top: 20, width: 100, height: 50 }, 150);
// { left: 10, top: 20, width: 150, height: 50 }ts
pipe({ left: 10, top: 20, width: 100, height: 50 }, Rect.setWidth(150));
// { left: 10, top: 20, width: 150, height: 50 }