
npm install -g typescript




tsconfig.json이 생성됨
아래의 정도로 설정하여 프로젝트를 진행
{
"compilerOptions": {
"module": "commonjs",
"noImplicitAny": false, // "any"타입에 오류를 발생할건지 아닌지 여부
"noEmitOnError": true, // 오류가 발생한 경우 출력을 내보내지 않음
"removeComments": true, // /!로 시작하는 copy-right 헤더 주석을 제외한 모든 주석을 제거
"sourceMap": true, // 소스맵 생성 여부
"target": "es6", // 타겟 자바스크립트 버전, 프론트엔드 프로젝트의 경우 익스플로러를 지원해야 한다면 es3, 백엔드 프로젝트면 es8정도면 되겠다.
"outDir": "dist" // 컴파일 결과물 출력 폴더
},
"include": ["src/**/"], // 컴파일할 대상
"exclude": ["node_modules", "*/.spec.ts"] // 컴파일 제외 대상
}
