-
-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(core): Better typescript support #345
base: main
Are you sure you want to change the base?
Conversation
@Myphz is attempting to deploy a commit to the darkroom Team on Vercel. A member of the Team first needs to authorize it. |
hey, thanks for taking the time on this! i am not sure we want to have all the typescript guards in the implementation. The typescript types are important for the api consumer not internals. a good choice may be defining types in a d.ts and leaving the core in js with jsdoc. I don't think @clementroche would like to use type guard like isHTMLElement. Will look review it closer when I have time for it. thanks tho. |
hello @Myphz, thank you for your PR however i've just merged the snap branch into main. Can you adapt your PR accordingly ? |
Thanks for your feedback. My changes were mostly on the I will soon update the PR for the latest update. Let me know if there's a better way to handle this task. Thank you! |
yeah, makes sense. maybe a seperate d.ts file would make more sense. will have to talk this over. types seem mostly sound as far I can tell from the quick glance i took. good job. |
I've updated the PR to the latest branch. This time, I made some changes to the Lenis class to simplify it a bit:
I may be wrong on these assumptions though - let me know your thoughts. Thanks |
userData is necessary |
fixed |
Thank you @Myphz, I will not merge your PR but use it as a base for improving types step by step to be sure that it doesn't break nothing and that I understand every choice you've made. |
any
sThis PR should not affect the logic whatsoever. It should improve the DX for TypeScript users.