Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: single-export-module is missing types for defineCustomElement functions #4093

Closed
3 tasks done
weaintplastic opened this issue Feb 23, 2023 · 4 comments · Fixed by #4194
Closed
3 tasks done

bug: single-export-module is missing types for defineCustomElement functions #4093

weaintplastic opened this issue Feb 23, 2023 · 4 comments · Fixed by #4194
Assignees
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil

Comments

@weaintplastic
Copy link

weaintplastic commented Feb 23, 2023

Prerequisites

Stencil Version

3.0.1

Current Behavior

When using the dist-custom-element output target with customElementsExportBehavior: 'single-export-module' we are experiencing missing type declarations for the defineCustomElement... functions of our components.

export { MyComponent as MyComponent } from '../types/components/my-component/my-component';

Expected Behavior

When publishing as a component library, I'd expect that consumers can access the type for the defineCustomElement... function the same way they can access the component's type.

export { MyComponent as MyComponent, defineCustomElement as defineCustomElementMyComponent  } from '../types/components/my-component/my-component';

System Info

No response

Steps to Reproduce

I've created a stackblitz reproduction example here: https://stackblitz.com/edit/node-mhjzxw?file=stencil.config.ts,dist%2Fcomponents%2Findex.js,dist%2Fcomponents%2Findex.d.ts

Code Reproduction URL

https://stackblitz.com/edit/node-mhjzxw?file=stencil.config.ts,dist%2Fcomponents%2Findex.js,dist%2Fcomponents%2Findex.d.ts

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Feb 23, 2023
@tanner-reits tanner-reits self-assigned this Feb 27, 2023
@tanner-reits
Copy link
Contributor

Hey @weaintplastic 👋

Took a look at this and can confirm there appears to be an issue with how/where the component type declarations are getting re-exported. I'll get this labeled and ingested into our backlog for us to resolve. Thanks for reporting!

@tanner-reits tanner-reits added Bug: Validated This PR or Issue is verified to be a bug within Stencil and removed triage labels Feb 27, 2023
@weaintplastic
Copy link
Author

Thanks a lot @tanner-reits

@tanner-reits
Copy link
Contributor

@weaintplastic Just wanted to let you know that a fix for this was merged in #4194 and will be available in an upcoming Stencil release! So, keep an eye out for that in the near future. Thanks again for letting us know about this!

@rwaskiewicz
Copy link
Contributor

The fix for this issue has gone out as a part of the Stencil v3.2.1 release - should it reappear, please feel free to open a new issue. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug: Validated This PR or Issue is verified to be a bug within Stencil
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants