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 }}
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.
const title: string | m.Vnode<any, any>
Argument of type 'Component<RouteLinkAttrs, {}> | "a"' is not assignable to parameter of type 'ComponentTypes<RouteLinkAttrs, {}>'.
Type '"a"' is not assignable to type 'ComponentTypes<RouteLinkAttrs, {}>'.ts(2345)
while this is perfectly legal (and working) JS code.
See also gitter for the original discussion of the behaviour.
The text was updated successfully, but these errors were encountered:
Hi @erikvullings, thanks for the report. I'm not sure if there's a good solution here. The hyperscript signature is defined with several overloads rather than as a single function accepting union types. Here's a standalone example of the problem:
We could change to a single, unified hyperscript signature that accepts union types for all the parameters, but the downside is that we'd lose almost all type checking (for component attrs, children.)
When writing the following code
The following exception is raised:
while this is perfectly legal (and working) JS code.
See also gitter for the original discussion of the behaviour.
The text was updated successfully, but these errors were encountered: