excalidraw/excalidraw
Refactor point types ` { x, y }` to the proper unified point type in `@excalidraw/math`
オープン
#9,297 opened on 2025/03/24
good first issue
Repository metrics
- Stars
- (130,212 個のスター)
- 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.