-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
add better handling for typescript compiler #2088
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
add better handling for typescript compiler #2088
Conversation
@T4rk1n before i carry on and add Unit test for these. This is what I was thinking to solve #2066 (comment). The error comes from not checking the type is related to JSX before trying to work out the props.
would cause the complier to break. So while i was at it, i thought its best to check the return type is an element. If this is ok, I'll take a look at how to add support for multiple components in a single file. Currently you always override the docs each time which isn't ideal |
The failed unit test relates to JSX just returning null. In real world I can't ever expect it not to be Element. But happy to remove that extra check for JSX |
Seems ok, just make sure that |
I'm happy to take a look and make any changes |
fix: soft file there is no props defined Check if export is either a class or function that returns JSX element This allows for none exported JSX functions in the file. Signed-off-by: Jordan Hall <[email protected]>
d7dc72b
to
4f6a6a4
Compare
4f6a6a4
to
8339740
Compare
fix: soft file there is no props defined
Check if export is either a class or function that returns JSX element
This allows for none exported JSX functions in the file.
For example if you had the following file:
The export default would crash and file due to not having props. Now it will check its a function or a class before trying to convert to dash py