darkroomengineering / lenis

How smooth scroll should be
https://lenis.darkroom.engineering
MIT License
7.33k stars 316 forks source link

"Property '__experimental__naiveDimensions' does not exist on type 'LenisOptions" when upgrading Typescript to 5.1.6 #309

Closed FlekaSukovicM closed 3 months ago

FlekaSukovicM commented 3 months ago

Describe the bug I am in the process of upgrading from Angular v15 to v16, and I had to upgrade Typescript to 5.16 in this process. This caused Lenis library to not compile with the following error:

Property 'experimentalnaiveDimensions' does not exist on type 'LenisOptions'.

constructor({ wrapper, content, wheelEventsTarget, eventsTarget, smoothWheel, syncTouch, syncTouchLerp, touchInertiaMultiplier, duration, easing, lerp, infinite, orientation, gestureOrientation, touchMultiplier, wheelMultiplier, normalizeWheel, autoResize, experimentalnaiveDimensions, }?: LenisOptions);

Looking into index.d.ts, it is evident that __experimental__naiveDimensions is not a field of LenisOptions type. Not sure why this didn't raise an error earlier.

clementroche commented 3 months ago

I've added this option for experimental reasons, i guess i need an extra tweak to make it TS compliant

clementroche commented 3 months ago

this should be fixed in v1.0.40