I'm attempting to adjust the position of an element based on the cursor's location. Here is the code I am currently using:
this.ngZone.runOutsideAngular(() => {
fromEvent(window, 'mousemove').pipe(
filter(() => this.hoveredCart !== -1),
).subscribe(({clientY}) => this.floatingElements.toArray()[this.hoveredCart].nativeElement
.style.top = clientY);
});
However, I am encountering an error message:
Property 'clientY' does not exist on type 'Event'