타입스크립트란 ?
타입 기능이 있으면 좋은 이유
- 잘못된 사용으로 인해 원하던 결과가 나오지 않을 수 있다.
- 오류의 원인이 무엇인지 파악하기 힘들다.
트랜스파일
Compile
- 컴파일이란, 한 언어로 작성된 소스 코드를 컴퓨터가 이해할 수 있는 언어로 변한하는 것을 의미한다.
- 컴파일의 예시는 다음과 같다.
- Java → Bytecode
- C Language → assmebly
Transpile
- 트랜스파일이란, 다른 실행 환경에서도 동작할 수 있도록 언어를 유지한 상태로 소스 코드의 형태만 바꾸는 것을 의미한다.
- 트랜스파일의 예시는 다음과 같다.
- ESNext → ES5
- Typescript → ESNext