From bf02bd32da30de21549cea82bcde62d1aeecd57b Mon Sep 17 00:00:00 2001 From: Achim Weimert Date: Fri, 14 Sep 2018 11:17:30 +0100 Subject: [PATCH] Add specific type for behaviors --- interfaces.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/interfaces.d.ts b/interfaces.d.ts index 4fdbeb40b1..41579bdb33 100644 --- a/interfaces.d.ts +++ b/interfaces.d.ts @@ -29,7 +29,7 @@ export interface PolymerInit { _template?: HTMLTemplateElement; hostAttributes?: {[key: string]: any}; listeners?: {[key: string]: string}; - behaviors?: PolymerInit | PolymerInit[]; + behaviors?: BehaviorInit | BehaviorInit[]; // Lifecycle methods registered?(): void; @@ -43,6 +43,11 @@ export interface PolymerInit { [others: string]: any; } +export type BehaviorInit = Pick< + PolymerInit, + Exclude +>; + // Types from "externs/polymer-internal-shared-types.js" export interface StampedTemplate extends DocumentFragment {