2022. 1. 25. 16:15ㆍ개발일지
회사 프로젝트 진행 중 시간이 남아 Typescript로 변경 작업을 진행 한다.
설치, eslint, ts-standar 설정으로 하루 반나절을 잡고 진행했고
이제 js 였던 프로젝트를 ts로 변경하는 작업을 진행하려고한다.
1. async await
https://crispypotato.tistory.com/176
TS Async Await @typescript-eslint/no-misused-promises 에러 해결
JS에서 사용 하듯이 async await를 그대로 ts에서 사용하면 Promise returned in function argument where a void return was expected.eslint@typescript-eslint/no-misused-promises 에러가 발생한다. 해결방법..
crispypotato.tistory.com
2. node_modules
https://crispypotato.tistory.com/178
TypeScript node_modules 안에 있는 *.d.ts 파일 에러
JS에서는 잘 작동했던 패키지가 갑자기 TypeScript변경 작업을 하며 컴파일 진행 시 릴리즈가 된 패키지에 있는 *.d.ts 파일에 에러가 발생하여 .d.ts파일을 내가 변경해야 되나 싶어 크게 당황했다. JS
crispypotato.tistory.com
3. dotenv
https://crispypotato.tistory.com/179
TypeScript에서 dotenv 사용 하기
TypeScript(es6문법)를 Javascript(es6)와 비슷한 위치에 사용을 하려고 하니 .env 파일이 적용이 되지않았다. 그래서 찾아보니 es6에서는 위치를 다르게 선언해야되는걸 찾았다. 해결 방법 express선언 전에
crispypotato.tistory.com
'개발일지' 카테고리의 다른 글
TypeScript 변경 작업 일지 #1 (0) | 2022.03.04 |
---|---|
2022/01/15 가계부 백 서버 ts로 변환 하기 2 (해결) (0) | 2022.01.15 |
2022/01/09 가계부 백 서버 ts로 변환 하기 (0) | 2022.01.09 |
2020-07-31 (0) | 2020.07.31 |
20/04/26 가계부 만들기 (0) | 2020.04.27 |