Loader 옵션으로 타입스크립트 실행시키기
기본적으로 타입스크립트는 자바스크립트 파일로 변환해야 NodeJS로 실행이 가능하지만 ts-node로 직접적인 변환 과정을 생략할 수 있다.
npm install -D ts-node
npx ts-node ./scripts/the-file-you-want-to-execute.ts
TypeScript 설정이 명시되어있는 tsconfig.json에서 ts-node 관련 설정만 추가해주면 모듈 에러 없이 실행이 가능했다.
module 속성으로 Com...
blog.nwlee.com1 min read