From cf0967fe0303e5da088ad01ef451dc150c7eb42d Mon Sep 17 00:00:00 2001 From: Joren Broekema Date: Tue, 10 Nov 2020 14:09:03 +0100 Subject: [PATCH] fix(form-core): fix type definition file types for styles --- .changeset/thin-birds-accept.md | 5 +++++ packages/form-core/types/FormControlMixinTypes.d.ts | 5 +++-- .../form-core/types/choice-group/ChoiceInputMixinTypes.d.ts | 5 +++-- 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 .changeset/thin-birds-accept.md diff --git a/.changeset/thin-birds-accept.md b/.changeset/thin-birds-accept.md new file mode 100644 index 000000000..aa587219c --- /dev/null +++ b/.changeset/thin-birds-accept.md @@ -0,0 +1,5 @@ +--- +'@lion/form-core': patch +--- + +Fix type definition file for CSSResultArray diff --git a/packages/form-core/types/FormControlMixinTypes.d.ts b/packages/form-core/types/FormControlMixinTypes.d.ts index 5acfac293..a0659509f 100644 --- a/packages/form-core/types/FormControlMixinTypes.d.ts +++ b/packages/form-core/types/FormControlMixinTypes.d.ts @@ -1,4 +1,5 @@ -import { CSSResult, LitElement, nothing, TemplateResult } from '@lion/core'; +import { CSSResultArray } from 'lit-element'; +import { LitElement, nothing, TemplateResult } from '@lion/core'; import { SlotsMap, SlotHost } from '@lion/core/types/SlotMixinTypes'; import { Constructor } from '@open-wc/dedupe-mixin'; import { DisabledHost } from '@lion/core/types/DisabledMixinTypes'; @@ -11,7 +12,7 @@ declare interface HTMLElementWithValue extends HTMLElement { } export declare class FormControlHost { - static get styles(): CSSResult | CSSResult[]; + static get styles(): CSSResultArray; static get properties(): { name: { type: StringConstructor; diff --git a/packages/form-core/types/choice-group/ChoiceInputMixinTypes.d.ts b/packages/form-core/types/choice-group/ChoiceInputMixinTypes.d.ts index a30ab7be1..5106f5a72 100644 --- a/packages/form-core/types/choice-group/ChoiceInputMixinTypes.d.ts +++ b/packages/form-core/types/choice-group/ChoiceInputMixinTypes.d.ts @@ -1,5 +1,6 @@ import { Constructor } from '@open-wc/dedupe-mixin'; -import { CSSResult, LitElement, TemplateResult } from '@lion/core'; +import { LitElement, TemplateResult } from '@lion/core'; +import { CSSResultArray } from 'lit-element'; import { FormatHost } from '../FormatMixinTypes'; export interface ChoiceInputModelValue { @@ -29,7 +30,7 @@ export declare class ChoiceInputHost { updated(changedProperties: Map): void; - static get styles(): CSSResult | CSSResult[]; + static get styles(): CSSResultArray; render(): TemplateResult;