anime icon indicating copy to clipboard operation
anime copied to clipboard

DraggableParams are not exported

Open SikandarJODD opened this issue 11 months ago • 1 comments

Describe the bug

DraggableParams are not exported in index.d.ts file

Expected behavior

  • While using createDraggable in a Svelte project, I tried to import DraggableParams, but it seems to be missing.

  • Just like we have AnimationParams exported, I was expecting to find DraggableParams as well. Is this omission intentional, or could it be an oversight?

Screenshots Image

Proposed Solution

It would be helpful to export DraggableParams from the index.d.ts file so it can be used externally.

SikandarJODD avatar Apr 04 '25 19:04 SikandarJODD

The problem is that I don't know how to mark a JSDoc type definition as "exportable“ by the generated index.d.ts file.

Would love some help on this!

juliangarnier avatar Apr 16 '25 16:04 juliangarnier

I ran into similar issue, i would like to work on it

AdeboyeDN avatar Apr 19 '25 13:04 AdeboyeDN

I ran into similar issue, i would like to work on it

Would love some help on this, are you familiar with JSDoc to TS types conversion?

juliangarnier avatar Apr 19 '25 13:04 juliangarnier

I ran into similar issue, i would like to work on it

Would love some help on this, are you familiar with JSDoc to TS types conversion?

yes, i am very familiar with jsDocs and ts types

AdeboyeDN avatar Apr 19 '25 14:04 AdeboyeDN

Great, at the moment there are two issues related to types, this one and #972.

Would love your input on this, or feel free to open a PR if you're confident in what should be changed.

I'm also open to suggestion to update the rollup config, since I'm currently using the deprecated rollup-plugin-ts plugin, and didn't have the time to figure out how to get the same easy automatic JSDoc comments to index.d.ts file conversion with the suggested replacements @rollup/plugin-typescript and rollup-plugin-dts plugins.

Let me know if you have any questions!

juliangarnier avatar Apr 19 '25 14:04 juliangarnier

Great, at the moment there are two issues related to types, this one and #972.

Would love your input on this, or feel free to open a PR if you're confident in what should be changed.

I'm also open to suggestion to update the rollup config, since I'm currently using the deprecated rollup-plugin-ts plugin, and didn't have the time to figure out how to get the same easy automatic JSDoc comments to index.d.ts file conversion with the suggested replacements @rollup/plugin-typescript and rollup-plugin-dts plugins.

Let me know if you have any questions!

Alright I will look into that too, Thanks

AdeboyeDN avatar Apr 19 '25 14:04 AdeboyeDN

Great, at the moment there are two issues related to types, this one and #972.

Would love your input on this, or feel free to open a PR if you're confident in what should be changed.

I'm also open to suggestion to update the rollup config, since I'm currently using the deprecated rollup-plugin-ts plugin, and didn't have the time to figure out how to get the same easy automatic JSDoc comments to index.d.ts file conversion with the suggested replacements @rollup/plugin-typescript and rollup-plugin-dts plugins.

Let me know if you have any questions!

Alright I will look into that too, Thanks

Hello,I noticed there's a gui/gui.js in the rollup config and it does not exist, any idea on what it is?

AdeboyeDN avatar Apr 19 '25 18:04 AdeboyeDN

Hello,I noticed there's a gui/gui.js in the rollup config and it does not exist, any idea on what it is?

You can comment this, it's leftovers from the beta version. It's already fixed on the dev branch.

juliangarnier avatar Apr 20 '25 08:04 juliangarnier

Hello,I noticed there's a gui/gui.js in the rollup config and it does not exist, any idea on what it is?

You can comment this, it's leftovers from the beta version. It's already fixed on the dev branch.

Opened a PR to add types for DraggableParams #1004 .

I wasn’t able to reproduce the issue described in #972 , as spread parameters should be optional by default.

It might be an issue with the plugin used by the user, but there wasn’t enough information provided about the error to confirm this.

Also, since rollup-plugin-dts is now in maintenance mode, it would be better to migrate this to TypeScript. This way, types can be generated easily without relying on additional plugins.

AdeboyeDN avatar Apr 21 '25 04:04 AdeboyeDN

Fixed in v4.0.2

juliangarnier avatar Apr 24 '25 10:04 juliangarnier