(rect: any)
| 2009 | } |
| 2010 | |
| 2011 | function rectValue(rect: any): JSONObject | null { |
| 2012 | if (!rect) { |
| 2013 | return null; |
| 2014 | } |
| 2015 | const x = finiteNumber(rect.origin?.x ?? rect.x); |
| 2016 | const y = finiteNumber(rect.origin?.y ?? rect.y); |
| 2017 | const width = finiteNumber(rect.size?.width ?? rect.width); |
| 2018 | const height = finiteNumber(rect.size?.height ?? rect.height); |
| 2019 | if (x == null || y == null || width == null || height == null) { |
| 2020 | return null; |
| 2021 | } |
| 2022 | return { |
| 2023 | x, |
| 2024 | y, |
| 2025 | width, |
| 2026 | height, |
| 2027 | }; |
| 2028 | } |
| 2029 | |
| 2030 | function pointValue(point: any): JSONObject | null { |
| 2031 | if (!point) { |
no test coverage detected