Comments (10)
Hi, if you are using this in your project you can set compilerOptions.skipLibCheck
to true and this will not type check this lib.
from node-soundcloud-downloader.
@zackradisic It is set to true and still throws errors. i have "skipLibCheck": true,
in my tsconfig
from node-soundcloud-downloader.
@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
from node-soundcloud-downloader.
@zackradisic Could not find a declaration file for module 'soundcloud-downloader/dist/index'. 'd:/Bernd/BerndPC/Documents/Github/Javascript/Discord-MusicBot/node_modules/soundcloud-downloader/dist/index.js' implicitly has an 'any' type. Try `npm i --save-dev @types/soundcloud-downloader` if it exists or add a new declaration (.d.ts) file containing `declare module 'soundcloud-downloader/dist/index';
But normally only the transpiled javascript gets shipped anyway, so is it for most packages
from node-soundcloud-downloader.
@zackradisic Do you have any support patch until 2.0.0
from node-soundcloud-downloader.
@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 v2.0.0
branch. You can install the module directly from there npm install zackradisic/node-soundcloud-downloader#v2.0.0
. I can't quite remember, but I think I fixed the type errors there. Just keep in mind that I'm developing on this branch and so I'm likely going to be introducing breaking changes.
from node-soundcloud-downloader.
@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
from node-soundcloud-downloader.
@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:
dts-bundle --name "soundcloud-downloader/dist" --main .\dist\index.d.ts
I get the generall structure but i had to import the Typings from src and then would get errors
So I now what functions want as arguments and the response type but not the typings itself
Edit2:
I am wrong I get typing but no errors. I dont know how and why but it works as expected
from node-soundcloud-downloader.
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!
from node-soundcloud-downloader.
Why do you need to make a own declaration? in my projects the tsc declaration is perfectly fine
from node-soundcloud-downloader.
Related Issues (20)
- Documentation is no longer available HOT 2
- Can't build project - Typescript problem HOT 3
- ..
- getSetInfo() artwork_url always null
- getSetInfo() returns tracks out of order when track count > 5 HOT 1
- Private tracks in private playlists called with getSetInfo() are not retrieved HOT 1
- Get a user's likes
- Breaking change in 0.2.1 from 0.2.0 HOT 4
- nothing is working HOT 1
- getInfo is not a function HOT 2
- TypeError: Cannot read property 'toLowerCase' of undefined HOT 1
- Bug: search() - Request to next_href link fails with 404 error HOT 5
- Error: Invalid date object from 'date' in client_id.json
- ne fonctionne plus HOT 4
- Error when build HOT 1
- Why does this CLOSE_WAIT happen?
- Please remove console.log in info.js
- downloadPlaylist error
- Can't check playlist of FirebaseURL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-soundcloud-downloader.