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
dist/react/src/CodeEditor.tsx:8:56 - error TS2345: Argument of type '(props: Props, elRef: ForwardedRef<any>) => Element' is not assignable to parameter of type 'ForwardRefRenderFunction<any, {}>'.
Types of parameters 'props' and 'props' are incompatible.
Property 'elRef' is missing in type '{}' but required in type 'Props'.
8 const CodeEditor = forwardRef<Props["elRef"]>(function CodeEditor(
~~~~~~~~~~
dist/react/src/CodeEditor.tsx:5:3
5 elRef: any;
~~~~~
'elRef' is declared here.
Actual Behaviour
To solve this TS error, we need to Omit the key from the props ref usage:
I am interested in helping provide a fix!
Yes
Which generators are impacted?
Reproduction case
https://mitosis.builder.io/?outputTab=E4UwhgxgLkA%3D&code=C4TwDgpgBACgTgezAZygXigbwFBShAGwCUIAzALigEMA7EAbmwF9HsIAPMBOYKAEzJUArgV6khNAMbAAlghpQAwggEBRPjODcAFGEQpK8JMgCUWXFDgRgQuAu0W8AHg0A3S2TSY9xgHSESUiYoAHoAPgsTRiZsIA
Expected Behaviour
When provided the following in Mitosis:
You get the following React output:
However, this leads to the TypeScript error of:
Actual Behaviour
To solve this TS error, we need to
Omit
the key from the propsref
usage:Additional Information
No response
The text was updated successfully, but these errors were encountered: