ionic-team / stencil

A toolchain for building scalable, enterprise-ready component systems on top of TypeScript and Web Component standards. Stencil components can be distributed natively to React, Angular, Vue, and traditional web developers from a single, framework-agnostic codebase.
https://stenciljs.com
Other
12.51k stars 782 forks source link

Internal typings for hyperscript nodes #2014

Closed harrysolovay closed 3 months ago

harrysolovay commented 4 years ago

I'm submitting a:

[ ] bug report [x] 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/

I'm creating a system that outputs a tree of hyperscript, to be consumed by Stencil's h utility. With the release of TypeScript 3.7, we can now model circular tuple types of unknown length. I've been using the following type:

type HyperscriptNode = [string, null | Record<string, unknown>, ...HyperscriptNode[]];

It's not urgent, but it'd be awesome if this was updated in the declarations, as to enable users to––when manually constructing VNodes––have added type-safety. I'm currently doing (h as any).apply(null, [...hypertext]) (as this is what's done in the Stencil documentation site). Using the internal type, instead of defining my own, would be sweet.

Once again, not urgent.

Kind regards,

Harry

christian-bromann commented 3 months ago

Hi @harrysolovay 👋

We apologize for the delay in addressing this issue. The StencilJS team has been hard at work, and we appreciate your patience.

As StencilJS has undergone significant updates and improvements since this issue was originally posted, we believe that this specific concern may no longer be relevant with the latest version. Therefore, we are closing this issue.

If you are still experiencing this problem or have any new issues, please feel free to open a new issue with the latest details, and we will be happy to assist you.

Thank you for your understanding and support of StencilJS!