13 Feb 2014, 12:35 PM
TypeScript Extjs code emitter
17 Jul 2014, 8:36 AM
Another typescript for extjs compiler
I also created a Typcript for ExtJs compiler, but this on also infers extra interfaces and methods based on ExtJS conventions,which can be very useful. All compiler features are opt-in using annotations in comments. Since you can replace the Visual Studio language service, all the stuff inferred by the compiler will be available in Visual Studio intelisense.
For example when defining a class you can tell the compiler to generate an interface that contains the configuration properties and you can use that as your constructor parameter so you get intelisense when you call the constructor.
2 Dec 2015, 11:59 AM
If you want to create typescript def files from extjs/touch code, one way is to run the extjs code with JsDuck using the JSON export option, and use the exported JSON to creatie your own .d.ts file.
2 Dec 2015, 12:14 PM
The large number of inconsistencies in the JSDuck docs and the underlying Ext JS API makes this much more difficult than it initially sounds.
This is a great help, thanks for the information!
1 Mar 2016, 12:19 PM
how about now?
i am using chrome and ecma 6 syntax like "let", "class", "const" are all working "out of the box"..
is there a need for typescript now that ecma 6 is implemented in most browsers. I think there is need now for a "shim" to support es5 and below if es6 is used in any application, because probably still at least half of browsers are es5 and under...
1 Mar 2016, 12:44 PM
I'm not sure what "how about now" means. If you're asking if you can write Ext JS apps using ES 6 classes...no. Or at least, not in any way that makes much sense. ES 6 class definitions are totally different than the Ext JS define() syntax.
Altering the way classes are defined in the compiled JS might be possible using ES 7 decorators, but you'd need to use TypeScript to get support for that right now.
TypeScript is superset of ECMA 6. Also, it can transpile to ES3 to ES6 to support any browsers. If you write native ES6 then your supported browser will be a lot less. There are just many laundry list to over why TypeScript is good. I don't get why JS developers don't like the concept of 'compiler'. It lets you catch error before you run the code! For example, you passed a string to a function that only accepts number. It's a definitely a win in my case and it's no wonder why TypeScript is getting to be very popular. If you use any popular editor, it even shows the error with specific line w/ exact error message! Let say ES10 comes out, you can simply change the configuration to generate 'es10' w/ 0 code changes. It is truly the most compatible programming language. I'm about 99% sure that no one will write JS natively and depend on some type of transpiler language like Babel/TypeScript/Dart/etc... As of now, I would pick TypeScript
Originally Posted by capn
I would not use either until the dust settles and one emerges as the clear winner. However, I am on a project now that lead developer using ecma6, so I have a bit of preview of what's to come now and in future..