darkroomengineering / lenis

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

Missing TypeScript type definitions for Instance Props #327

Closed DiMazurenko closed 3 months ago

DiMazurenko commented 7 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 6 months ago

PR are welcome

Myphz commented 5 months ago

I'm working on it - #345

feledori commented 4 months ago

currently working on this in #369.

clementroche commented 4 months ago

published in v1.1.10-dev.0, can you try @DiMazurenko ?