Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

TypeScript

Anybody using WebWorks with TypeScript?

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands
Retired
Posts: 165
Registered: ‎09-24-2012
My Device: Passport
My Carrier: Bell

Re: TypeScript

Personally, I don't miss 'classes' and prefer vanilla JS objects (with Require.js), however, I've played with TypeScript and since it compiles/wraps to JavaScript, there is no difference to WebWorks.

Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: TypeScript

Would be nice if BB offered a TypeScript interface file. There is a lot of nice things that TypeScript offers. Especially on larger, more complicated apps. It offers generics, variable types, compile checking and more. jQuery and a lot of JS libraries support it.
Developer
Posts: 1,229
Registered: ‎03-20-2011
My Device: Playbook, Z10 LE, Dev Alpha B, 2x Dev Alpha C
My Carrier: 3, Orange, Vodafone

Re: TypeScript

According to Wiki...

 

The TypeScript compiler, named tsc, is written in TypeScript that can be compiled into regular JavaScript that can be executed in any JavaScript engine in any host, such as a browser.

 

As such it should be possible to package it in an extension so TS in = JS out

 

There's a node package for it as well (had a go at porting Node yesterday - not fun)

 

I might have a play @ w/e




Click the like button if you find my posts useful!
Developer
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
My Carrier: Verizon

Re: TypeScript

I started to use TypeScript on a large project. Very invaluable. Almost fun to use. All the things I dislike about JS is managed in TypeScript. Typed variables, re-compiles, inheritance, statics, singletons, generics. Make JS a real programming language.
Developer
Posts: 1,280
Registered: ‎03-03-2011
My Device: Playbook, Z10, Q10, Z30 with Files & Folders and Orbit of course
My Carrier: Vodafone

Re: TypeScript

Yes, TypeScript is very promising. When I tried it a few months ago I found it very usable, but the combo TS + Chrome was lacking a little in runtime errors (the JS errors were often not helpfull) and debugging (support for source maps).

 

It will, of course, work with any JS library including WebWorks, BBUI.js, JQuery Mobile etc but becomes much, much more functional when that library has a matching declaration file.

Files & Folders, the unified file & cloud manager for PlayBook and BB10 with SkyDrive, SugarSync, Box, Dropbox, Google Drive, Google Docs. Free 3-day trial! - Jon Webb - Innovatology - Utrecht, Netherlands