excalidraw/excalidraw
GitHub で見るRefactor point types ` { x, y }` to the proper unified point type in `@excalidraw/math`
Open
#9,297 opened on 2025年3月24日
good first issue
Repository metrics
- Stars
- (123,243 stars)
- PR merge metrics
- (平均マージ 5d 7h) (30d で 18 merged PRs)
説明
Goal: Have a unified point type system across the codebase.
- Create missing point type
ViewportPoint= [x, y] in@excalidraw/math - Create unified point type
GenericPointin@excalidraw/math - Refactor point generic function type parameters to extend
GenericPointwhere applicable - Refactor object point types (i.e.
{ x: number, y: number }to use GlobalPoint, LocalPoint, ViewportPoint or a combination as applicable
Note: Watch out for rough-js point types, which are also [x,y] but cannot be refactored. Avoid type casting as much as possible.