작성
·
336
2
환경: windows10, VS Code, Powershell
증상: tsc src/index.ts 명령 실행시 아래 오류메시지 생김
오류메시지:
src/index.ts:55:14 - error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
질문2:
제 소스 코드를 보면 검색한 주소를 화면에 보여주기 위해서 setTimeout() 을 사용했는데, 더 좋은 방법은 없을지도 궁금해요.
답변 1
2
또 자답입니다만, 스택오버플로의 도움으로 아래 두 모듈을 설치하고 나니 정상적으로 컴파일이 되었습니다.
"@types/es6-promise": "^3.3.0",
"@types/es6-shim": "^0.31.41",
왜 그런지는 잘 모르겠네요.