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
This works fine in the select and I did not expect to get any typescript errors.
Actual Behavior
I get the typescript error: Property 'slots' in type 'EvSelectInvoker' is not assignable to the same property in base type 'LionSelectInvoker'. Type '{ after: () => TemplateResult<1>; }' is not assignable to type '{ after: () => HTMLSpanElement; }'.
Which makes sense, because LionSelectInvoker.d.ts has the type defined as:
getslots(): {
after: ()=>HTMLSpanElement;};
I've worked around the issue by casting the return as unknown as HTMLSpanElement, but I feel uneasy shortcircuiting lion types like this. Am I okay returning the templateresult like I have (which seems to work fine in the browser)? Or is the type in LionSelectInvoker.d.ts simply too restrictive?
Expected behavior
I have overriden the LionSelectInvoker
getSlots
method with the following definition for theafter
function:This works fine in the select and I did not expect to get any typescript errors.
Actual Behavior
I get the typescript error:
Property 'slots' in type 'EvSelectInvoker' is not assignable to the same property in base type 'LionSelectInvoker'. Type '{ after: () => TemplateResult<1>; }' is not assignable to type '{ after: () => HTMLSpanElement; }'.
Which makes sense, because
LionSelectInvoker.d.ts
has the type defined as:I've worked around the issue by casting the return
as unknown as HTMLSpanElement
, but I feel uneasy shortcircuiting lion types like this. Am I okay returning the templateresult like I have (which seems to work fine in the browser)? Or is the type inLionSelectInvoker.d.ts
simply too restrictive?Additional context
LionSelectRich,
@lion/[email protected]
The text was updated successfully, but these errors were encountered: