-
Notifications
You must be signed in to change notification settings - Fork 26
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
Does the package has types? #47
Comments
That is correct. It is written in plain JS without type declarations. If you happen to add type declarations I'm happy to merge them upstream :) |
Hi, I did added types for example methods for now, but before continue working on it i want to ask you about if I could get many instances of the tracker instead of being a singleton? if you could guide me with main steps to do so I could add this as well, or is it possible already with current structure? |
It is not possible with the current code base. Implementing it should be fairly straightforward though. At the moment all methods are exported directly and all variables to track state are global. To allow for multiple instances of the tracker all you need to do is wrap everything into an object and then export the entire object. That should allow you to create multiple instances. |
I am trying to use it but it seems that it doesn't has types, or I am missing something?
ERROR: Could not find a declaration file for module 'node-moving-things-tracker'. 'node_modules/node-moving-things-tracker/main.js' implicitly has an 'any' type.
The text was updated successfully, but these errors were encountered: