use-scroll-position
use-scroll-position copied to clipboard
Argument of type 'MutableRefObject<HTMLElement | null>' is not assignable to parameter of type 'MutableRefObject<HTMLElement | undefined>'.
Argument of type 'MutableRefObject<HTMLElement | null>' is not assignable to parameter of type 'MutableRefObject<HTMLElement | undefined>'.
Type 'HTMLElement | null' is not assignable to type 'HTMLElement | undefined'.
Type 'null' is not assignable to type 'HTMLElement | undefined'.ts(2345)
ElementRef should be of type 'MutableRefObject<HTMLElement | null>' per https://github.com/DefinitelyTyped/DefinitelyTyped/issues/35572#issuecomment-498242139
I am getting the same error. I would appreciate the PR being merged.