I'm trying to make Polymer 2.0 work with Typescript and am running into issues when making a constructor where libraries - including Polymer 2 - do not expose a proper typings file. In the simplest case:
class MyView1 extends Polymer.Element {
public static is = 'my-view1';
constructor() {
super(); // [ts] Call target does not contain any signature
}
}
To make it compile at all without the constructor, I've done a declare var Polymer: any; in a main .d.ts file.
Now, I have two questions:
- How (if at all) can I make typescript ignore this and just assume there's a super constructor it can call?
- How (if at all) do I declare a typings file that contains a signature for the super class? I haven't been able to find the right documentation for this (and the various use cases I've run into so far) yet.