From d6d3c822785fd7dd2e5dd270cbb244847b1dbee5 Mon Sep 17 00:00:00 2001 From: Achim Weimert Date: Fri, 14 Sep 2018 10:55:34 +0100 Subject: [PATCH] Improve typings for legacy elements https://github.com/Polymer/polymer/issues/5350 --- interfaces.d.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/interfaces.d.ts b/interfaces.d.ts index 9ff30e0ac7..4fdbeb40b1 100644 --- a/interfaces.d.ts +++ b/interfaces.d.ts @@ -26,9 +26,21 @@ export interface PolymerInit { extends?: string; properties?: PolymerElementProperties; observers?: string[]; - template?: HTMLTemplateElement|string; + _template?: HTMLTemplateElement; hostAttributes?: {[key: string]: any}; listeners?: {[key: string]: string}; + behaviors?: PolymerInit | PolymerInit[]; + + // Lifecycle methods + registered?(): void; + created?(): void; + attached?(): void; + detached?(): void; + ready?(): void; + attributeChanged?(name: string, old?: string, value?: string); + + // Allow any other user-defined properties + [others: string]: any; } // Types from "externs/polymer-internal-shared-types.js"