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
{{ message }}
Repository navigation
bug: defineCustomElements return type is wrong #4589
I have searched for existing issues that already report this problem, without success.
Stencil Version
4.0.1
Current Behavior
Currently the return type of defineCustomElements is defined as a Promise<void> on this line in the output-lazy-loader,
but the promise got removed in this commit.
Expected Behavior
The return value of defineCustomElements should be typed correctly. However, I am not sure whether this change should be marked as a breaking change.
System Info
No response
Steps to Reproduce
Import defineCustomElements from the loader of a package and try to do something after the promise gets resolved.
Activity
alicewriteswrongs commentedon Jul 18, 2023
@andrew9994 thanks for reporting, I was just able to confirm that this is an issue by putting together a quick reproduction here (https://github.com/alicewriteswrongs/stencil-custom-elements-repro)
In the future when reporting issues if you have time to put together something along those lines it greatly helps us in diagnosing problems!
The fix is straightforward here so I'm going to get going on it. Thanks again for filing this!
fix(lazy): adjust the type of `defineCustomElements`
fix(lazy): adjust the type of `defineCustomElements`
fix(lazy): adjust the type of `defineCustomElements`
fix(lazy): adjust the type of `defineCustomElements` (#4592)
andrew9994 commentedon Jul 21, 2023
Thanks @alicewriteswrongs for jumping on this so quickly 😊 and sorry for not creating a repro repo, will do it next time.
rwaskiewicz commentedon Jul 24, 2023
The fix for this issue has been released as a part of today's Stencil v4.0.2 release. As a result, I'm going to close this issue. Thanks!