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
It is possible that they are missing JSX.IntrinsicElements definitions leading to jsx typing errors.
For instance, if one is willing to add the attribute xmlns-link in an svg element, typescript will emit the following error is not assignable to type 'SVGAttributes<SVGElement>.
It is not possible to consider all typings. Especially for specific use cases. A good solution is to extend the stencil JSX typing in an ambient declaration module as follow:
Unfortunately, it is not documented anywhere and someone can struggle a lot to find out a way to make it work.
Furthermore, it is strange to be obliged to import a function not used in the code but injected during compilation. Wouldn't be nicer to add the import { h } from '@stencil/core' dynamically before ts is compiled and add the namespace h in an ambient global definition?
Stencil version:
I'm submitting a:
[x] 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/
Current behavior:
It is possible that they are missing JSX.IntrinsicElements definitions leading to jsx typing errors.
For instance, if one is willing to add the attribute
xmlns-link
in ansvg
element, typescript will emit the following erroris not assignable to type 'SVGAttributes<SVGElement>
.It is not possible to consider all typings. Especially for specific use cases. A good solution is to extend the stencil JSX typing in an ambient declaration module as follow:
Unfortunately, it is not documented anywhere and someone can struggle a lot to find out a way to make it work.
Furthermore, it is strange to be obliged to import a function not used in the code but injected during compilation. Wouldn't be nicer to add the
import { h } from '@stencil/core'
dynamically before ts is compiled and add thenamespace h
in an ambient global definition?Expected behavior:
Extended JSX typing working.
Related code:
The text was updated successfully, but these errors were encountered: