-
Notifications
You must be signed in to change notification settings - Fork 22
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
Error when compiling #76
Comments
Hi, if you are using this in your project you can set |
@zackradisic It is set to true and still throws errors. i have |
@kaaax0815 Ok try importing the lib like this: import scdl from 'soundcloud-downloader/dist/index' This will force import of the transpiled JavaScript, instead of the Typescript you will have to compile. This is not an ideal solution and I'm working on v2.0.0 which fixes these problems. Please let me know if you still have problems |
@zackradisic But normally only the transpiled javascript gets shipped anyway, so is it for most packages |
@zackradisic Do you have any support patch until 2.0.0 |
@kaaax0815 Yeah forgot to mention that importing the transpiled JavaScript means you won't get any typings, and you'll have to declare the module in a .d.ts file. This is probably the best option for right now. If you still want typings for intellisense, I'm working on v2.0.0 on the |
@zackradisic okay ill go with the custom decleration. but i would recommend you only ship the js with the decleration. that is what most do. but thanks for your help |
@zackradisic Do you have a full declaration? because if i import it from the typescript path I get errors again. And If i declare an empty module everything is 'any' which defeats the whole purpose of typescript Edit: With:
I get the generall structure but i had to import the Typings from src and then would get errors Edit2: I am wrong I get typing but no errors. I dont know how and why but it works as expected |
Yeah so the declarations file was lazily made and imports the .ts files, which does not help your problem 😅 Have never heard of dts-bundle, but it seems to have done the job, nice find! |
Why do you need to make a own declaration? in my projects the tsc declaration is perfectly fine |
The text was updated successfully, but these errors were encountered: