ThibaultJanBeyer / DragSelect

An easy JavaScript library for selecting and moving elements. With no dependencies. Drag-Select & Drag-And-Drop. – Examples:
https://dragselect.com/
Other
715 stars 81 forks source link

Build error #212

Closed Ruslan207 closed 8 months ago

Ruslan207 commented 11 months ago

Describe the bug when i install and import DragSelect v3.03 or v3.0.4, it throws typing error Error: node_modules/dragselect/dist/DragSelect.d.ts:767:40 - error TS2304: Cannot find name ‘E_1’. 767 publish: <T extends DSCallbackName>(eventName: T | T[], data: DSPublishMappings[T]) => void;

I've checked DragSelect.d.ts in dist folder and E_1 is mentioned there only once

kkkheladze commented 11 months ago

Having the same problem... Settled down for v2.7.4

ThibaultJanBeyer commented 8 months ago

Hi there @Ruslan207 & @kkkheladze thanks a lot for using the tool and reporting! I'm looking into this at the moment. Would you mind sharing how you are building it? Like what's your environment? And ideally a sandbox that reproduces the error? Because internally the dogfood project is building fine.

ThibaultJanBeyer commented 8 months ago

I tried with a nextjs app and it builds fine. However the line you mentioned seems weird indeed. I'll have a look on what generates that line. If you experience this issue but want to use v3 you can rename E_1 to E for now.

ThibaultJanBeyer commented 8 months ago

I think I got it, PR is out

ThibaultJanBeyer commented 8 months ago

It should be fixed now in 3.0.5, please re-try and let me know :)

Still would be nice if you could share your set-up so that I can add a test so it doesn't happen again in the future, thank you!