You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Being able to extend LionInput class and register it as a custom element. And being able to call common methods on it like focus and validate.
minimal reproducible code snippet
import{LionInput}from'@lion/ui/input';import{customElement}from'lit/decorators.js';import'@lion/ui/define/lion-input';
@customElement('input-atom')exportclassInputextendsLionInput{}declare global {interfaceHTMLElementTagNameMap{'input-atom': Input;}}
Actual Behavior
I get an error when trying to use the customElement decorator:
Unable to resolve signature of class decorator when called as an expression.
Argument of type 'typeof Input' is not assignable to parameter of type 'CustomElementClass | ClassDescriptor'.
Type 'typeof Input' is not assignable to type 'CustomElementClass'.
Types of property 'prototype' are incompatible.
Type 'LionInput' is missing the following properties from type 'HTMLElement': accessKey, accessKeyLabel, autocapitalize, dir, and 283 more. [1238]
And functions that I know exist in the input component don't exist according to typescript.
Additional context
I use @lion/ui version 0.3.5
Also this behaviour exists for all the input components. I have the feeling that it might be a tsconfig issue. I couldn't find an example of a tsconfig that works.
All help is appreciated.
The text was updated successfully, but these errors were encountered:
Expected behavior
Being able to extend LionInput class and register it as a custom element. And being able to call common methods on it like focus and validate.
minimal reproducible code snippet
Actual Behavior
I get an error when trying to use the customElement decorator:
And functions that I know exist in the input component don't exist according to typescript.
Additional context
I use @lion/ui version 0.3.5
Also this behaviour exists for all the input components. I have the feeling that it might be a tsconfig issue. I couldn't find an example of a tsconfig that works.
All help is appreciated.
The text was updated successfully, but these errors were encountered: