I am trying to get Polymer 2.0 to work with Typescript and run into problems creating a constructor where libraries, including Polymer 2, do not set the correct typing file. In the simplest case:
class MyView1 extends Polymer.Element {
public static is = 'my-view1';
constructor() {
super();
}
}
To compile it without a constructor, I did declare var Polymer: any;in the main file .d.ts.
Now I have two questions:
- How (if at all) can I make Typescript ignore this and just assume there is a super constructor that it can call?
- How (if at all) to declare a typing file that contains a signature for a superclass? I could not find suitable documentation for this (and the various use cases I have used so far).