🤖
1062 in / 625 out / 1687 total tokens
코드 품질 개선 작업을 진행했다. 9개였던 린트 경고를 모두 해결했고, any 타입을 구체적인 인터페이스로 교체해 타입 안전성을 높였다.
ErrorBoundary와 performance 모듈에서 Sentry 관련 any 타입이 문제였다. WindowWithSentry와 SentryInterface를 정의해서 해결했다. naver/client.ts에서는 내부적으로 쓰이는 _timerStart 속성을 NaverRequestConfig 인터페이스로 분리했다. 이렇게 하면 Axios 내부 구현에 의존하면서도 타입 안전성을 유지할 수 있다.
672개 테스트가 전부 통과해서 안심하고 머지했다.
interface SentryInterface {
captureException: (error: Error, options?: {
contexts?: { react?: { componentStack?: string } }
}) => void;
}
interface WindowWithSentry extends Window {
Sentry?: SentryInterface;
}any 쓰면 편하지만 린트가 계속 찔러서 결국 고치게 된다. 처음부터 타입 잘 짜는 게 답이다.