ionic-team/stencil

CustomElementsDefineOptions is missing transformTagName

Closed this issue · 5 comments

Snapu commented

Stencil version:

 @stencil/core@2.4.0

I'm submitting a:

[x] bug report
[ ] feature request
[ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/

Current behavior:

error:

Argument of type '{ transformTagName: (tagName: any) => string; }' is not assignable to parameter of type 'CustomElementsDefineOptions'.
  Object literal may only specify known properties, and 'transformTagName' does not exist in type 'CustomElementsDefineOptions'.

Expected behavior:

No type errors

Steps to reproduce:

  1. set config:
config.extras.tagNameTransform: true
  1. call defineCustomElements:
defineCustomElements(window, { transformTagName: tagName => `YOUR_APP_ID-${tagName}` });
  1. observe error

Related code:

// insert any relevant code here

Other information:

I just wanted to add that this is only a TypeScript definition error and the underlying functionality works.

Quick workaround until this is fixed:
defineCustomElements(window, { transformTagName: tagName => `YOUR_APP_ID-${tagName}` } as any);

Hi @Snapu, first off I want to apologize that no one from the Stencil team got to this for so long. Sorry about that! We are working to be more responsive to community issues, part of which is staying on top of new issues, and part of which is following up on old ones.

In any case, I've been able to confirm that this is an issue in the latest version of Stencil.

In the course of doing so, I put together a quick reproduction case, here: https://github.com/alicewriteswrongs/stencil-transform-tag-name-repro

I'm going to label this issue so we ingest it into our backlog and can prioritize it.

Thanks for reporting, and sorry again for the wait!

Hi here,

Is there a plan to have this fixed?
Do you know which is the latest working version?
Would you have some advice on where to start looking into it to try to provide a fix?

It would be quite important for us and I could dedicate some time

tagNameTransform is also missing in the documentation. Please help to provide a fix for this.

It seems that this feature doesn't fulfill the requirements anymore we have to current Stencil enhancements. If there is still interest in this we should tackle it from a new feature request since a lot has changed since the original issue was posted. Thank you!