타입스크립트: 두 판 사이의 차이
보이기
내용 삭제됨 내용 추가됨
편집 요약 없음 |
|||
9번째 줄: | 9번째 줄: | ||
|설계자 = [[마이크로소프트]] |
|설계자 = [[마이크로소프트]] |
||
|개발자 = [[마이크로소프트]] |
|개발자 = [[마이크로소프트]] |
||
| latest release version = {{wikidata|property|edit|reference|P548=Q2804309|P348}} |
|||
|최근 버전 = 4.0.2 |
|||
| latest release date = {{start date and age|{{wikidata|qualifier|single|P548=Q2804309|P348|P577}}}} |
|||
|최근 버전 출시일 = {{시작 날짜와 나이|df=yes|2020|08|20}}<ref>{{웹 인용|title=Release . Microsoft/TypeScript | url=https://github.com/Microsoft/TypeScript/releases/latest | |
|||
| latest preview version = {{wikidata|property|edit|reference|P548=Q51930650|P348}} |
|||
website=TypeScript|accessdate=2020년 8월 20일}}</ref> |
|||
|미리보기 버전 = 4.0 Beta}<ref>{{웹 인용|title=Release . Microsoft/TypeScript | url=https://github.com/Microsoft/TypeScript/releases/latest | |
|||
website=TypeScript|accessdate=2020년 8월 20일}}</ref> |
|||
|미리보기 버전 출시일 = {{시작 날짜와 나이|df=yes|2020|07|07}} |
|||
|형 체계 = [[덕 타이핑]], gradual, structural<ref>{{웹 인용|title=Type Compatibility | url=https://www.typescriptlang.org/docs/handbook/type-compatibility.html | |
|형 체계 = [[덕 타이핑]], 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> |
2022년 5월 20일 (금) 17:57 판
패러다임 | 멀티 패러다임: 함수형, 제네릭, 명령형, 객체 지향 |
---|---|
설계자 | 마이크로소프트 |
개발자 | 마이크로소프트 |
발표일 | 2012년 10월 1일[1] |
최근 버전 | 5.5.4[2] |
최근 버전 출시일 | 2024년 7월 22일 |
자료형 체계 | 덕 타이핑, gradual, structural[3] |
라이선스 | 아파치 라이선스 2.0 |
파일 확장자 | .ts, .tsx |
웹사이트 | www |
영향을 받은 언어 | |
C#, 자바, 자바스크립트 | |
영향을 준 언어 | |
AtScript |
타입스크립트(TypeScript)는 자바스크립트의 슈퍼셋인 오픈소스 프로그래밍 언어이다. 마이크로소프트에서 개발, 유지하고 있으며 엄격한 문법을 지원한다. C#의 리드 아키텍트이자 델파이, 터보 파스칼의 창시자인 Anders Hejlsberg가 개발에 참여한다.[4] 클라이언트 사이드와 서버 사이드를 위한 개발에 사용할 수 있다.
타입스크립트는 자바스크립트 엔진을 사용하면서 커다란 애플리케이션을 개발할 수 있게 설계된 언어이다.[5] 자바스크립트의 슈퍼셋이기 때문에 자바스크립트로 작성된 프로그램이 타입스크립트 프로그램으로도 동작한다.
타입스크립트에서 자신이 원하는 타입을 정의하고 프로그래밍을 하면 자바스크립트로 컴파일되어 실행할 수 있다.
타입스크립트는 모든 운영 체제, 모든 브라우저, 모든 호스트에서 사용 가능한 오픈 소스이다.
언어 기능
타입 어노테이션
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월 3일에 원본 문서에서 보존된 문서. 2015년 4월 26일에 확인함.
- ↑ “Release 5.5.4”. 2024년 7월 22일. 2024년 7월 28일에 확인함.
- ↑ “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일에 확인함.
외부 링크
이 글은 프로그래밍 언어에 관한 토막글입니다. 여러분의 지식으로 알차게 문서를 완성해 갑시다. |