lenis icon indicating copy to clipboard operation
lenis copied to clipboard

Missing TypeScript type definitions for Instance Props

Open DiMazurenko opened this issue 1 year ago • 2 comments

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!

DiMazurenko avatar Apr 16 '24 14:04 DiMazurenko

PR are welcome

clementroche avatar May 21 '24 15:05 clementroche

I'm working on it - #345

Myphz avatar Jun 03 '24 11:06 Myphz

currently working on this in #369.

feledori avatar Jul 28 '24 19:07 feledori

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

clementroche avatar Jul 30 '24 12:07 clementroche