카테고리 없음

Typescript

c29130811 2021. 5. 19. 22:58

타입 스크립트(typescript)는 마이크로소프트에서 개발 및 유지 보수 중인, 느슨한 타입(loosely typed) 언어인 javascript에 superset(상위확장)이다. 

 

https://www.typescriptlang.org

 

How to set up TypeScript

Add TypeScript to your project, or install TypeScript globally

www.typescriptlang.org

 

타입스크립트는 실행하기 위해서 .ts 타입 스크립트를 컴파일(compile)을 진행하며, 결과적으로는 javascript를 실행하게 된다. 

 

타입 스크립트 장점

  1. 정적 타이핑
    : 자료형 (Type)을 컴파일 시 결정, 즉 변수에 들어갈 값의 형태에 따라 자료형을 사전에 지정
    컴파일 단계에서 오류를 포착할 수 있는 장점이 있다.
    //기존 함수 지정
    function sum(a, b) {
      return a + b;
    }
    
    //typescript
    function sum(a: number, b: number) {
      return a + b;
    }
    
    sum('c', 'd'); //에러 발생​
  2. ECMAScript의 가장 최신 업데이트를 빠르게 반영
    1. https://github.com/microsoft/TypeScript
  3. 커뮤니티의 활성화
    : 각 커뮤니케이션이 활성화 된 만큼 참고할 자료가 많다. 
    1. https://www.zdnet.com/article/programming-language-rankings-javascript-still-rules-python-holds-off-java
    2. https://octoverse.github.com
 

microsoft/TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - microsoft/TypeScript

github.com

 

Programming language rankings: JavaScript still rules, Python holds off Java | ZDNet

The Python programming language appears to have a firm hold as the second most popular language over Java.

www.zdnet.com

 

The State of the Octoverse

The State of the Octoverse explores a year of change with new deep dives into developer productivity, security, and how we build communities on GitHub.

octoverse.github.com

 

앞으로 하나씩 배워서 포스트를 해봐야겠다. 

728x90