DefinitelyTyped/types/polymer
Peter Burns 4b658ce8a6 [polymer] Expose polymer.PolymerElement type in Polymer 1.x typings. (#31407)
* [polymer] Expose polymer.PolymerElement type in Polymer 1.x typings.

This is a type that represents a Polymer element after its class has been constructed by the Polymer() function.

Previously people would construct such a type by doing:

```typescript
interface MyElement extends HTMLElement, polymer.Base {}
```

But after TypeScript 3.0, the type of `HTMLElement#toggleAttribute` is different than the type of `polymer.Base#toggleAttribute`, which makes it an error to declare the MyElement type as above.

Unfortunately, we can't change the type of toggleElement on polymer.Base, so instead we introduce a new type polymer.PolymerElement that already extends `HTMLElement`.

So after this change, a Polymer 1.0 user can write their type as:

```typescript
interface MyElement extends polymer.PolymerElement {}
```

* Fix a couple of small issues.
2018-12-20 16:18:29 -08:00
..
index.d.ts
polymer-tests.ts
tsconfig.json
tslint.json