-
Notifications
You must be signed in to change notification settings - Fork 1k
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
How to use the typescript definition to write browser only code? #415
Comments
I made further research and I learned about the evil difference between "internal" and "external" "modules". This link is the one that gave me more insight regarding this particular issue: microsoft/TypeScript#557. In this link Ryan Cavanaugh aswers telling that a typescript definitions file should be developed using an "internal/external" pattern, but I don't know what is it. In the end, my solution had been to edit the index.d.ts in Installed by typings with my version that follows... I really don't if this is the correct solution, if it is, feel free to integrate it in your code ;-) - Thank you !
then within my internal modules I can refer to the NeDBDatastore in this way:
which leaves me in the world of the internal modules ... phew! |
I'm trying to use nedb with typescript but I didn't find a way to instantiate an NeDBDatastore using the d.ts that comes with
typings install dt!nedb -S --ambient
The application is actually structured using typescript namespaces only.
When I try to add
import * as Nedb from "nedb";
on top of my file, the namespaces defined in the same file becomes "invisible" by other scripts referencing it.
I'm still not very familiar with modules in typescript, so this may be asilly question, and I'm sorry if it really is! But any help would be really appreciated, thank you!
The text was updated successfully, but these errors were encountered: