darkroomengineering / lenis

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

Missing TypeScript type definitions for Instance Props #327

Open DiMazurenko opened 2 months ago

DiMazurenko commented 2 months ago

Describe the bug Hello,

I've been using your library with TypeScript and noticed that there are missing type definitions for certain properties of the Instance Props. This issue affects the integration and use of the library in TypeScript projects as type safety is compromised. Below are the properties that currently lack type definitions:

animatedScroll: Expected to have a type number, represents the current scroll value. dimensions: Expected to be an object type, represents the dimensions instance. direction: Expected to have a type number, where 1 indicates scrolling up and -1 indicates scrolling down. emitter: Expected to be an object type, represents the emitter instance. options: Expected to be an object type, represents the instance options. targetScroll: Expected to have a type number, represents the target scroll value. time: Expected to have a type number, represents the time elapsed since the instance was created. actualScroll: Expected to have a type number, represents the current scroll value registered by the browser. velocity: Expected to have a type number, represents the current scroll velocity.

Could you please add these missing type definitions to enhance TypeScript support? This would greatly improve the developer experience for those of us using TypeScript.

Thank you!

clementroche commented 1 month ago

PR are welcome

Myphz commented 4 weeks ago

I'm working on it - #345