TypeScript 로 RxJs 개발 하기
우선 typescript 와 build 도구인 gulp-cli 를 설치한다. https://www.typescriptlang.org/ http://gulpjs.com/
tools
npm install -g typescript typings gulp-cli npm init
build
여기서는 build 도구로 gulp 를 쓰겠다.
npm install gulp gulp-typescript --save-dev npm install jquery
gulpfile.js 다음 페이지를 참고 https://www.typescriptlang.org/docs/handbook/gulp.html
RxJs
Google 에서 rxjs 를 검색하면 두 개가 나온다. 처음엔 어떻게 다른지 몰랐는데 버전 차이인듯 하다.
v5 beta
https://github.com/ReactiveX/rxjs http://reactivex.io/rxjs
v4
https://github.com/Reactive-Extensions/RxJS http://reactivex.io/
v5 는 TypeScript 로 작성되었기 때문에 d.ts 파일이 필요없지만 v4 는 d.ts (type definition file) 파일이 필요하다.
typings install rx --save --global
http://stackoverflow.com/questions/36933788/using-rxjs-with-typescript
Promise 를 사용하기 위해서는 아래 링크 참조 http://stackoverflow.com/questions/27573365/how-to-use-typescript-with-native-es6-promises
tsconfig.json 파일이 필요한데
tsc --init
https://github.com/Microsoft/TypeScript/issues/3079
or
Create a new tsd.json and tsd.d.ts
tsd init
https://github.com/DefinitelyTyped/tsd
으로 생성할 수 있다.
상세 설정은 아래 링크를 참조 https://www.typescriptlang.org/docs/handbook/tsconfig-json.html
Editor
https://github.com/Microsoft/TypeScript/wiki/TypeScript-Editor-Support













