Open jcardonadcdev opened 7 years ago
I would appreciate this too.
In the meantime you will probably find this helpful https://www.sitepen.com/blog/2017/03/29/what-typescript-can-offer-to-dojo-1-x/
Does anyone have an example of this working?
Yes see the link above, you will find it very helpful. Basically you just need to add declareDecorator to your project and enable experimental decorators in your tsconfig.
Here is a link to a very simple example
https://www.dropbox.com/s/vmtc10dc405n39e/ExampleWidget.zip?dl=0
Thanks for the sample - I had (finally) got something similar working myself.
The current issue I am seeing is trying to "derive" a Dojo JS class from a TypeScript Dojo Class. While this is probably just a non runner, it would greatly help in a large migration we are doing?
(Between this and https://github.com/OpenNTF/dojo-webpack-plugin we finally have a modern dev environment for the legacy wen app!!!).
It would be nice to have an advanced example that shows how to make a widget that extends
_WidgetBase
and_TemplatedMixin
. I see some examples in github repositories, but it would be good to get an example from SitePen that demonstrates best practices.