PS. Playground doesn't not support TypeScript yet.
Actual Behaviour
Both default values given in useDefaultProps and undefined from optional property declared in the props type with TypeScript show up. Make the code unusable because of invalid syntax.
I am interested in helping provide a fix!
Yes
Which generators are impacted?
Reproduction case
https://mitosis.builder.io/playground/?code=JYWwDg9gTgLgBAbzgVwM4FMAi6BmBDZAGxgAUoIxU4BfOHckOAcgAEAjZYQgE3SgDpgEAPQhgMCKmComAbgBQ84ADsYffAGN0cMhSoJ5cOADc8hZOgD8ALjioYUFQHMF1RegAekWHF74i8DjIyhowQspwALIAngDCEOAQyuiqABRg5JS2upQAlIiGKBjY%2FsQ5qKkGRkam5ui2TAAW6ISEEEwANIXUuQqFUOgwyFARADzcwMYAfAgZevy1FtSjwhPTrkA
Expected Behaviour
If the default value is given in
useDefaultProps
, it should be used as the default value instead ofundefined
.PS. Playground doesn't not support TypeScript yet.
Actual Behaviour
Both default values given in
useDefaultProps
andundefined
from optional property declared in the props type with TypeScript show up. Make the code unusable because of invalid syntax.Additional Information
No response