Skip to content

Conversation

zth
Copy link
Member

@zth zth commented Jan 31, 2023

Fixes #707

A bit unsure if this is the best approach. What do you think @cristianoc ?

@zth zth requested a review from cristianoc January 31, 2023 21:08
(* JSX V4 external or interface *)
getFieldsV4 ~path ~typeArgs
| Tarrow (Nolabel, typ, _, _) -> (
(* Component without the JSX PPX, like a make fn taking a hand-written
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should one check anything about the return type? Or can it be anything?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could check the return type for sure but I'm unsure if it really matters that much. Strictly though it needs to be React.element, or whatever JSX element is configured (not sure if it can be configured now, but it'll be possible later). For this to error, you'd need to use a JSX component with a make function in a module that takes a type named props, and return something else then React.element (which will error in compilation anyway).

I say we go without it for this case, and then fix it if need be?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good

@zth zth merged commit 9c13e7a into master Feb 1, 2023
@zth zth deleted the fix-completion-for-handwritten-components branch February 1, 2023 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSX v4 auto completion

2 participants