From 8d9219f903ab054b4975bf58c42a56164c31fbbe Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Wed, 31 Oct 2018 18:30:56 -0700 Subject: [PATCH] update more types --- types/lib/legacy/class.d.ts | 2 +- types/lib/legacy/legacy-element-mixin.d.ts | 1 + types/lib/mixins/element-mixin.d.ts | 7 ------- types/lib/utils/boot.d.ts | 7 +++++++ types/lib/utils/settings.d.ts | 7 +++++++ 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/types/lib/legacy/class.d.ts b/types/lib/legacy/class.d.ts index fe4124a07f..52d2ff8677 100644 --- a/types/lib/legacy/class.d.ts +++ b/types/lib/legacy/class.d.ts @@ -91,5 +91,5 @@ declare namespace Polymer { * * @returns Generated class */ - function Class(info: PolymerInit): {new(): HTMLElement}; + function Class(info: PolymerInit, mixin: (p0: T|null) => T|null): {new(): HTMLElement}; } diff --git a/types/lib/legacy/legacy-element-mixin.d.ts b/types/lib/legacy/legacy-element-mixin.d.ts index 6f4d187381..40c4be507f 100644 --- a/types/lib/legacy/legacy-element-mixin.d.ts +++ b/types/lib/legacy/legacy-element-mixin.d.ts @@ -30,6 +30,7 @@ declare namespace Polymer { interface LegacyElementMixinConstructor { new(...args: any[]): LegacyElementMixin; + _finalizeClass(): void; } interface LegacyElementMixin extends Polymer.ElementMixin, Polymer.PropertyEffects, Polymer.TemplateStamp, Polymer.PropertyAccessors, Polymer.PropertiesChanged, Polymer.PropertiesMixin, Polymer.GestureEventListeners { diff --git a/types/lib/mixins/element-mixin.d.ts b/types/lib/mixins/element-mixin.d.ts index 907b0493a1..c0d43eb01d 100644 --- a/types/lib/mixins/element-mixin.d.ts +++ b/types/lib/mixins/element-mixin.d.ts @@ -223,11 +223,4 @@ declare namespace Polymer { */ resolveUrl(url: string, base?: string): string; } - - /** - * Provides basic tracking of element definitions (registrations) and - * instance counts. - */ - namespace telemetry { - } } diff --git a/types/lib/utils/boot.d.ts b/types/lib/utils/boot.d.ts index 4175f31846..3b07397343 100644 --- a/types/lib/utils/boot.d.ts +++ b/types/lib/utils/boot.d.ts @@ -16,4 +16,11 @@ * own custom HTML elements. */ declare namespace Polymer { + + /** + * Provides basic tracking of element definitions (registrations) and + * instance counts. + */ + namespace telemetry { + } } diff --git a/types/lib/utils/settings.d.ts b/types/lib/utils/settings.d.ts index b2f90ffe76..17364c51c1 100644 --- a/types/lib/utils/settings.d.ts +++ b/types/lib/utils/settings.d.ts @@ -37,4 +37,11 @@ declare namespace Polymer { * Sets `passiveTouchGestures` globally for all elements using Polymer Gestures. */ function setPassiveTouchGestures(usePassive: boolean): void; + + + /** + * Sets `legacyOptimizations` globally for all elements. Enables + * optimizations when only legacy Polymer() style elements are used. + */ + function setLegacyOptimizations(useLegacyOptimizations: boolean): void; }