From af7d389ce699a9debce42ab87084a83ba595345c Mon Sep 17 00:00:00 2001 From: Peter Burns Date: Wed, 31 Jan 2024 15:35:28 -0800 Subject: [PATCH] Fix two build issues Some TypeScripts need resolve explicitly typed, and some closure compiler versions need the `whenDefined` method on our registry ponyfill quoted. --- .../src/scoped-custom-element-registry.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/scoped-custom-element-registry/src/scoped-custom-element-registry.ts b/packages/scoped-custom-element-registry/src/scoped-custom-element-registry.ts index c4069409..0b368c39 100644 --- a/packages/scoped-custom-element-registry/src/scoped-custom-element-registry.ts +++ b/packages/scoped-custom-element-registry/src/scoped-custom-element-registry.ts @@ -99,7 +99,7 @@ if (!ShadowRoot.prototype.createElement) { readonly promise: Promise; readonly resolve: (val: T) => void; constructor() { - let resolve; + let resolve: (val: T) => void; this.promise = new Promise((r) => { resolve = r; }); @@ -210,7 +210,7 @@ if (!ShadowRoot.prototype.createElement) { return this._definitionsByTag.get(tagName); } - whenDefined(tagName: string) { + ['whenDefined'](tagName: string) { const definition = this._getDefinition(tagName); if (definition !== undefined) { return Promise.resolve(definition.elementClass);