-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[lit-html] RefOrCallback should be generic #3966
Copy link
Copy link
Closed
Description
Which package(s) are affected?
Lit Core (lit / lit-html / lit-element / reactive-element)
Description
RefOrCallback is not generic like Ref<T> and so does not forward a ref element type to Ref:
export type RefOrCallback = Ref | ((el: Element | undefined) => void);This should be:
export type RefOrCallback<T = Element> = Ref<T> | ((el: T | undefined) => void);Reproduction
n/a
Workaround
Make your own type.
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
2.x
Browser/OS/Node environment
all
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
✅ Done