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
In non typescript components, i.e. no lang="ts" or something similar. This works in some areas. But it mostly doesn't work in the new transformation.
In typescript component. I don't think this will ever be supported. In the current implementation. The whole svelte component is transformed into a single .tsx file or a .ts file in the new transformation. This means there's no way it can partly be treated as js.
In this case, I would suggest using a function in the script to type assert instead.
<script>
functioncastAsFoo(_items) {return _items as Foo}
</script>
<Dropdownitems={castAsFoo(items)} />
Describe the problem
while attempting to do a type cast while working around sveltejs/svelte#4701, i noticed that jsdoc comment types aren't supported
Describe the proposed solution
support type casts in jsdoc comments:
Alternatives considered
Importance
would make my life easier
The text was updated successfully, but these errors were encountered: