인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

programmerjay's profile image
programmerjay

asked

Learn TypeScript with a real-world project

Definition of return type of global corona summary information API function

판교님 질문있습니다....

Written on

·

341

1

AxiosResponse 하는 부분에서

아래와 같이 에러가 뜹니다..

(Cannot find name 'AxiosResponse'.)

axios 설치 다시하고 무엇을 설정해야 할지 잘 모르겠습니다.

es6typescript

Answer 2

2

programmerjay님의 프로필 이미지
programmerjay
Questioner

import { AxiosResponse } from "axios";라고 하면 axios에 에러가 생기네요..

0

captain님의 프로필 이미지
captain
Instructor

안녕하세요 jay님, axios는 내부적으로 @types 라이브러리가 제공되고 있어서 별도로 설치하지 않으시더라도 npm i axios만 하시면 타입 관련 정보는 다 제공받으실 수 있어요. AxiosResponse에서 ctrl + space로 node_modules/axios/ 밑에 있는 타입 정보를 들고 오시면 됩니다 :)

programmerjay's profile image
programmerjay

asked

Ask a question