From 32294c17ba02b69032419866621334a3a520a527 Mon Sep 17 00:00:00 2001 From: ylakhdar Date: Tue, 14 Jan 2025 09:56:03 -0500 Subject: [PATCH] chore(atomic): replace HTMLStencilElement with HTMLElement (#4835) `HTMLStencilElement` is not used anywhere in the codebase. It's simply a type enhancer over HTMLElement. Since we migrate to Lit, there is no point in keeping that type https://coveord.atlassian.net/browse/KIT-3827 --------- Co-authored-by: GitHub Actions Bot <> --- packages/atomic/src/components/common/interface/bindings.ts | 5 ++--- .../src/components/common/interface/interface-common.tsx | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/atomic/src/components/common/interface/bindings.ts b/packages/atomic/src/components/common/interface/bindings.ts index edea41b8716..28a1fc31076 100644 --- a/packages/atomic/src/components/common/interface/bindings.ts +++ b/packages/atomic/src/components/common/interface/bindings.ts @@ -1,7 +1,6 @@ import type {SearchEngine} from '@coveo/headless'; import {CommerceEngine} from '@coveo/headless/commerce'; import type {RecommendationEngine} from '@coveo/headless/recommendation'; -import {HTMLStencilElement} from '@stencil/core/internal'; import {i18n} from 'i18next'; import {InsightEngine} from '../../insight'; import {AtomicCommonStore, AtomicCommonStoreData} from './store'; @@ -30,7 +29,7 @@ export interface CommonStencilStore { export interface CommonBindings< Engine extends AnyEngineType, Store extends AtomicCommonStore, - InterfaceElement extends HTMLStencilElement, + InterfaceElement extends HTMLElement, > { /** * A headless engine instance. @@ -68,7 +67,7 @@ export interface NonceBindings { export type AnyBindings = CommonBindings< AnyEngineType, AtomicCommonStore, - HTMLStencilElement + HTMLElement >; export type AnyEngineType = diff --git a/packages/atomic/src/components/common/interface/interface-common.tsx b/packages/atomic/src/components/common/interface/interface-common.tsx index 46b3ad55274..ecddc42dc9c 100644 --- a/packages/atomic/src/components/common/interface/interface-common.tsx +++ b/packages/atomic/src/components/common/interface/interface-common.tsx @@ -1,6 +1,5 @@ import {LogLevel} from '@coveo/headless'; import {ComponentInterface, h} from '@stencil/core'; -import {HTMLStencilElement} from '@stencil/core/internal'; import {i18n, TFunction} from 'i18next'; import Backend from 'i18next-http-backend'; import {setCoveoGlobal} from '../../../global/environment'; @@ -23,7 +22,7 @@ export interface BaseAtomicInterface iconAssetsPath: string; logLevel?: LogLevel; language?: string; - host: HTMLStencilElement; + host: HTMLElement; bindings: AnyBindings; error?: Error;