javascript - Typescript specific methods for saving data online? -
i'm thinking using typescript create online app, , require saving of data online.
- what options in regards that?
- is there specific using typescript makes easier or harder?
- ideally use service parse.com save data, can typescript connected parse or have rely upon plain js?
typescript runs wherever javascript runs.
- your options same javascript.
typescript compiles down javascript. , designed superset of javascript javascript valid typescript long have variables declared , types mentioned.
- optional static typing + easier syntax makes developing in typescript easier.
static typing makes refactoring , intellisense more reliable. having easier syntax classes / modules means more structure code better.
- yes can use parse.com typescript
the recommended way create declaration file describing javascript code. in beginning can simple as:
declare var parse:any;
i wrote guidance on matter here : http://basarat.github.io/typescriptdeepdive/#/declarations
there huge resource of declaration files can find @ https://github.com/borisyankov/definitelytyped . in particular check out firebase : https://www.firebase.com/ , declaration file : https://github.com/borisyankov/definitelytyped/tree/master/firebase there isn't 1 on parse.com yet why mentioned way write own.
additionally don't need declaration file if not want impressive static checking of typescript code interacts parse.com's api.
Comments
Post a Comment