강의

멘토링

커뮤니티

Inflearn Community Q&A

rhkdtjd124829's profile image
rhkdtjd124829

asked

[Renewal] TypeScript All-in-One: Part 2. Practical Analysis

How to deal with AxiosError and unknown error

axios 1.6.0 버전으로 보고 있는데영

Written on

·

373

4

axios 1.6.0에서는

export function isAxiosError<T = any, D = any>(payload: any): payload is AxiosError<T, D>;

제네릭 넣는공간이 생겼네용!!

다른분들도 참고 하시라고 남깁니다!

typescript

Answer 1

0

zerocho님의 프로필 이미지
zerocho
Instructor

네 if 문 안에서 쓰면 인식도 됩니다

rhkdtjd124829's profile image
rhkdtjd124829

asked

Ask a question