타입스크립트: 두 판 사이의 차이
보이기
내용 삭제됨 내용 추가됨
편집 요약 없음 |
잔글 봇: 틀 이름 및 스타일 정리 |
||
1번째 줄: | 1번째 줄: | ||
{{Infobox programming language |
{{Infobox programming language |
||
| name = 타입스크립트 |
| name = 타입스크립트 |
||
| logo = [[ |
| logo = [[파일:TypeScript Logo.svg|frameless]] |
||
| logo caption = |
| logo caption = |
||
| screenshot = |
| screenshot = |
||
| screenshot caption = |
| screenshot caption = |
||
| paradigm = [[멀티 패러다임 프로그래밍 언어|멀티 패러다임]]: [[함수형 프로그래밍|함수형]], [[제네릭 프로그래밍|제네렉]], [[명령형 프로그래밍|명령형]], [[객체 지향 프로그래밍|객체 지향]] |
| paradigm = [[멀티 패러다임 프로그래밍 언어|멀티 패러다임]]: [[함수형 프로그래밍|함수형]], [[제네릭 프로그래밍|제네렉]], [[명령형 프로그래밍|명령형]], [[객체 지향 프로그래밍|객체 지향]] |
||
| released = {{ |
| released = {{시작 날짜와 나이|2012|10|01|df=yes}}<ref>{{웹 인용|url = https://typescript.codeplex.com/releases/view/95554 |title = TypeScript |work = [[CodePlex]] |accessdate = 26 April 2015}}</ref> |
||
| designer = [[마이크로소프트]] |
| designer = [[마이크로소프트]] |
||
| developer = [[마이크로소프트]] |
| developer = [[마이크로소프트]] |
||
| latest release version = 3.6 |
| latest release version = 3.6 |
||
| latest release date = {{ |
| latest release date = {{시작 날짜와 나이|df=yes|2019|08|28}}<ref>{{웹 인용|title=Release . Microsoft/TypeScript | url=https://github.com/Microsoft/TypeScript/releases/latest | |
||
website=TypeScript|accessdate=10 July 2019}}</ref> |
website=TypeScript|accessdate=10 July 2019}}</ref> |
||
| latest preview version = 3.7 베타<ref>{{ |
| latest preview version = 3.7 베타<ref>{{인용|title=TypeScript is a superset of JavaScript that compiles to clean JavaScript output.: microsoft/TypeScript|date=2019-10-02|url=https://github.com/microsoft/TypeScript|publisher=Microsoft|access-date=2019-10-02}}</ref> |
||
| latest preview date = {{ |
| latest preview date = {{시작 날짜와 나이|df=yes|2019|10|02}} |
||
| typing = duck, gradual, structural<ref>{{ |
| typing = duck, gradual, structural<ref>{{웹 인용|title=Type Compatibility | url=https://www.typescriptlang.org/docs/handbook/type-compatibility.html | |
||
website=TypeScript|accessdate=21 March 2018}}</ref> |
website=TypeScript|accessdate=21 March 2018}}</ref> |
||
| scope = |
| scope = |
2019년 10월 25일 (금) 21:48 판
패러다임 | 멀티 패러다임: 함수형, 제네렉, 명령형, 객체 지향 |
---|---|
설계자 | 마이크로소프트 |
개발자 | 마이크로소프트 |
발표일 | 2012년 10월 1일[1] |
최근 버전 | 3.6 |
최근 버전 출시일 | 2019년 8월 28일[2] |
미리보기 버전 | 3.7 베타[3] |
미리보기 버전 출시일 | 2019년 10월 2일 |
자료형 체계 | duck, gradual, structural[4] |
라이선스 | 아파치 라이선스 2.0 |
파일 확장자 | .ts, .tsx |
웹사이트 | www |
영향을 받은 언어 | |
C#, 자바, 자바스크립트 | |
영향을 준 언어 | |
AtScript |
타입스크립트(TypeScript)는 자바스크립트의 슈퍼셋인 오픈소스 프로그래밍 언어이다. 마이크로소프트에서 개발, 유지하고 있으며 엄격한 문법을 지원한다. C#의 리드 아키텍트이자 델파이, 터보 파스칼의 창시자인 Anders Hejlsberg가 개발에 참여한다.[5] 클라이언트 사이드와 서버 사이드를 위한 개발에 사용할 수 있다.
타입스크립트는 자바스크립트 엔진을 사용하면서 커다란 애플리케이션을 개발할 수 있게 설계된 언어이다.[6] 자바스크립트의 슈퍼셋이기 때문에 자바스크립트로 작성된 프로그램이 타입스크립트 프로그램으로도 동작한다.
타입스크립트에서 자신이 원하는 타입을 정의하고 프로그래밍을 하면 자바스크립트로 컴파일되어 실행할 수 있다.
타입스크립트는 모든 운영 체제, 모든 브라우저, 모든 호스트에서 사용 가능한 오픈 소스이다.
언어 기능
타입 어노테이션
function add(left: number, right: number): number {
return left + right;
}
선언 파일
declare namespace arithmetics {
add(left: number, right: number): number;
subtract(left: number, right: number): number;
multiply(left: number, right: number): number;
divide(left: number, right: number): number;
}
클래스
class Person {
private name: string;
private age: number;
private salary: number;
constructor(name: string, age: number, salary: number) {
this.name = name;
this.age = age;
this.salary = salary;
}
toString(): string {
return `${this.name} (${this.age}) (${this.salary})`; // As of version 1.4
}
}
제네릭스
function doSomething<T>(arg: T): T {
return arg;
}
각주
- ↑ “TypeScript”. 《CodePlex》. 2015년 4월 26일에 확인함.
- ↑ “Release . Microsoft/TypeScript”. 《TypeScript》. 2019년 7월 10일에 확인함.
- ↑ 《TypeScript is a superset of JavaScript that compiles to clean JavaScript output.: microsoft/TypeScript》, Microsoft, 2019년 10월 2일, 2019년 10월 2일에 확인함
- ↑ “Type Compatibility”. 《TypeScript》. 2018년 3월 21일에 확인함.
- ↑ Foley, Mary Jo. “Microsoft takes the wraps off TypeScript, a superset of JavaScript | ZDNet”. 《ZDNet》 (영어). 2018년 2월 14일에 확인함.
- ↑ “Microsoft TypeScript: the JavaScript we need, or a solution looking for a problem?”. 《Ars Technica》 (미국 영어). 2018년 2월 14일에 확인함.
외부 링크
이 글은 프로그래밍 언어에 관한 토막글입니다. 여러분의 지식으로 알차게 문서를 완성해 갑시다. |