typescript
로 이미지를 불러올 때 에러가 났다.
이 에러를 해결해보자!!
프로젝트 디렉토리 root 레벨에 @types/global/index.d.ts
폴더 및 파일을 생성한다.
허용할 확장자를 적어준다.
declare module '*.gif';
tsconfig.json
- compilerOptions
안에
"typeRoots": ["./node_modules/@types", "@types"]
이 내용을 작성해주면 된다.