From 9e8df6821b93357442b74d34868d4e3bcd60ef9f Mon Sep 17 00:00:00 2001 From: Russell Bicknell Date: Wed, 13 May 2020 14:24:51 -0700 Subject: [PATCH] Upstream internal type differences. --- lib/legacy/class.d.ts | 2 +- lib/legacy/polymer.dom.d.ts | 3 +++ lib/utils/settings.d.ts | 9 +++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/legacy/class.d.ts b/lib/legacy/class.d.ts index 3d45b53cf1..b395448773 100644 --- a/lib/legacy/class.d.ts +++ b/lib/legacy/class.d.ts @@ -16,7 +16,7 @@ export {mixinBehaviors}; * @returns Returns a new Element class extended by the * passed in `behaviors` and also by `LegacyElementMixin`. */ -declare function mixinBehaviors(behaviors: object|object[], klass: {new(): T}): any; +declare function mixinBehaviors(behaviors: object|object[], klass: {new(): T}): {new(): T}; export {Class}; diff --git a/lib/legacy/polymer.dom.d.ts b/lib/legacy/polymer.dom.d.ts index fc713e27ad..f4e5e3faba 100644 --- a/lib/legacy/polymer.dom.d.ts +++ b/lib/legacy/polymer.dom.d.ts @@ -17,6 +17,9 @@ export {matchesSelector}; */ declare function matchesSelector(node: Node, selector: string): boolean; + +export {DomApiNative as DomApi}; + /** * Node API wrapper class returned from `Polymer.dom.(target)` when * `target` is a `Node`. diff --git a/lib/utils/settings.d.ts b/lib/utils/settings.d.ts index 046d4baa6a..9972531fa4 100644 --- a/lib/utils/settings.d.ts +++ b/lib/utils/settings.d.ts @@ -12,6 +12,11 @@ export {setRootPath}; */ declare function setRootPath(path: string): void; + +export type SanitizeDOMValueFunction = + (value: unknown, name: string, type: 'property'|'attribute', + node: Node|null|undefined) => unknown; + export {setSanitizeDOMValue}; @@ -19,7 +24,7 @@ export {setSanitizeDOMValue}; * Sets the global sanitizeDOMValue available via this module's exported * `sanitizeDOMValue` variable. */ -declare function setSanitizeDOMValue(newSanitizeDOMValue: ((p0: any, p1: string, p2: string, p3: Node|null) => any)|undefined): void; +declare function setSanitizeDOMValue(newSanitizeDOMValue: SanitizeDOMValueFunction|undefined): void; export {getSanitizeDOMValue}; @@ -29,7 +34,7 @@ export {getSanitizeDOMValue}; * * @returns sanitizeDOMValue */ -declare function getSanitizeDOMValue(): ((p0: any, p1: string, p2: string, p3: Node|null) => any)|undefined; +declare function getSanitizeDOMValue(): SanitizeDOMValueFunction|undefined; export {setPassiveTouchGestures};