We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f041de commit 58f5601Copy full SHA for 58f5601
docs/jsx.md
@@ -320,10 +320,9 @@ The following code will work without errors:
320
* Use TranslatedComponent to create Closure Components that can be inspected by TypeScript.
321
*/
322
export function TranslatedComponent<T>(create: m.ClosureComponent<T>) {
323
- return (attrs: T) => {
324
- const vNode = attrs as m.Vnode<T>;
325
- return create(vNode) as unknown as JSX.Element;
326
- }
+ return create as any as (
+ (attrs: T & Mithril.CommonAttributes<T, unknown>) => JSX.Element
+ )
327
}
328
329
0 commit comments