-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Which package is this a feature request for?
React (@lit-labs/react)
Description
An explicit helper type for devs to use in JSXIntrinicElements would reduce type conflicts for react clients.
declare namespace JSX {
interface IntrinsicElements {
foo: HelperType<CustomElement>;
}
}Currently we rely on Typescript to infer what is returned from createComponent and although TS is fairly good, an inference is not as durable as an explicit typing.
Related to: #3163
Alternatives and Workarounds
There are a few caveats to keep in mind:
- our package returns a
ForwardedRefas a component - web components not created through
createComponentstill need proper typing, they are not aForardRef
Two types should be exported:
- type returned from
createComponent - a type any dev can use for
IntrinsicElements
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
✅ Done