3 ms·
I found Polymer to be very easy to pickup coming from Angular 1 & 2. The only friction I experienced was difficulty integrating TypeScript. Given how Polymer c
by adamduren 10y ago
I found Polymer to be very easy to pickup coming from Angular 1 & 2. The only friction I experienced was difficulty integrating TypeScript.
Given how Polymer components are typically written with the JavaScript included with the HTML file of the component this was not really an easy option for a beginner.
However using tools like polymer-build with gulp you can still get TypeScript support. In the upcoming Polymer 2.0 release TypeScript typings are going to be included with the library!
- zacharytamas 10y agoYeah... I used it initially with no TS experience, but coming back to it later I do find myself missing TS. But yeah you can use polymer-build to split the script block out of the HTML file, run it through TSC, then insert it back into the file as JS.
- nsthorat 10y agoYou can do something simple like this: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tensorboard/components/vz_projector/vz-projector-util.ts https://github.com/tensorflow/tensorflow/blob/master/tensorf... And a simple implementation: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tensorboard/components/vz_projector/vz-projector-metadata-card.ts https://github.com/tensorflow/tensorflow/blob/master/tensorf...
- spankalee 10y agoYep, we're going to greatly expand our support of TypeScript with Polymer 2.0. We'll have supported type declarations, and decorators to help write elements, and eventually (though maybe not at Polymer 2.0's release) tools support in the Polymer Analyzer and IDE plugins. You'll even be able to type check and auto-complete in your templates. There's a little dated PR that adds TypeScript decorators here: https://github.com/Polymer/polymer/pull/3954 https://github.com/Polymer/polymer/pull/3954 We're probably going to break out the decorators into a separate packages, since the ECMAScript decorators proposal has diverged a bit from what TypeScript supports now.