코드를 작성하던 도중 다음과 같은 에러가 떴다.
["Authorization"] is better written in dot notation.eslint@typescript-eslint/dot-notation
사실 axios 공식문서 고대로 타이핑 한 것이라 에러가 떠서 많이 당황스러웠다.
instance.defaults.headers.common['Authorization'] = `Bearer ${accessToken}`;
대괄호로 접근하는 것이 아닌 점 연산자 ( . )를 이용해서 접근해야한다.
instance.defaults.headers.common.Authorization = `Bearer ${accessToken}`;