insight-viewer icon indicating copy to clipboard operation
insight-viewer copied to clipboard

@lunit/insight-viewer Point type refactor

Open LTakhyunKim opened this issue 3 years ago • 0 comments

개선 방식

기존 Point type 인 [number, number] 형식에서 { x:number y: number } 로 변경합니다.

개선으로 얻는 이점

x, y 좌표에 대한 값이지만 [number, number] 포맷은 이를 표기하기엔 어려움이 있습니다. 이로 인해 명시적으로 x, y 좌표임을 표기하기 위해 구조 분해 할당으로 별도의 선언을 하는 로직이 필요했습니다. 타입을 보다 명시적으로 변경하여 x, y 좌표임을 명확히 표기할 수 있습니다.

LTakhyunKim avatar Mar 29 '22 06:03 LTakhyunKim