带有聚合物1.0的打字稿? [英] Typescript with Polymer 1.0?
问题描述
我发现我一直在与Polymer 0.5( http ://www.mikecann.co.uk/programming/tinkering-with-google-polymer-and-typescript/),以能够将Typescript类用于聚合物元素.这种方法不再适用于Polymer 1.0.我尝试过
I found this great article I had been using with Polymer 0.5 ( http://www.mikecann.co.uk/programming/tinkering-with-google-polymer-and-typescript/ ) for being able to use Typescript Classes for Polymer Elements. This approach no longer works with Polymer 1.0 . I tried
class CreatorStudio extends Polymer.Class({}) {
is = "creator-studio";
}
/*(function () {
Polymer(CreatorStudio.prototype);
})();*/
document.registerElement("creator-studio", CreatorStudio.prototype);
还有许多其他方法,但似乎无法获得与Polymer({is:"creator-studio"});相同的元素.
And a number of other approaches but can't seem to get the element to register the same as Polymer({is: "creator-studio"});
有人能够获得TS类和Polymer 1.0一起玩吗?
Anyone been able to get TS classes and Polymer 1.0 to play together?
推荐答案
,您可以使用软件包 PolymerTS
这篇关于带有聚合物1.0的打字稿?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!