mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
* [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.
|
||
|---|---|---|
| .. | ||
| index.d.ts | ||
| polymer-tests.ts | ||
| tsconfig.json | ||
| tslint.json | ||