-
Notifications
You must be signed in to change notification settings - Fork 0
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
Help for localForage #6
Comments
Do you have a If you use "files": ["typings/main.d.ts"] If you are compiling everything, use "exclude": ["typings/browser"] The reason the folders are like that is literally to support the |
Thanks @blakeembrey I indeed have a tsconfig.json, here it is just in case (fileGlob is there while waiting for actual glob support in tsconfig.json although I do not use Atom ^^):
|
Adding the following seem to have made tsc happier:
|
@dsebastien Yep, that's what you needed. Also, from your configuration, I don't believe you should be using The browser/main versions are to support the |
Also, it works in |
Hello @blakeembrey,
I would like to get typings for the localForage library and use those in my project.
At first, I tried using tsd and thus the following typings file: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/localForage/localForage.d.ts
Unfortunately, it imports the es6-promise typings and because Angular 2 (which I also use in my project) expose that already, I end up with the dreaded duplicate identifier error (on 'Promise'):
Then, since I wanted to give your project a try, I've decided to give it a go, except that I don't really know where to start :)
I first tried a command that failed (can't remember what it was), which led me to fork the registry and try to add a reference towards definitelytyped for localForage: https://github.com/dsebastien/registry-1/commit/828d9998570d4d548f15f9eff9baa8f92e7cc239
Then I found the
--ambient
flag and realized that it's probably not worth a pull request (?).Then I've tried
typings install localForage --ambient --save
which did find the typings on DefinitelyTyped and download those:Unfortunately, tsc complains a bit afterwards:
Now I'm wondering how to fix this. I assume that removing either the contents of the browser folder or the ambient one would fix this, but is it the way to do?
Am I missing some other flag?
Or do I need to create some other type of module (i.e., non-ambient) like https://github.com/typings/typed-debug from the info I have on DefinitelyTyped?
Any pointers will be very appreciated :)
The text was updated successfully, but these errors were encountered: