-
Notifications
You must be signed in to change notification settings - Fork 6
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
Plans to add types? #8
Comments
I came across Hammer.js, whose codebase seems notably larger at first sight. I’m not sure about the difference and used none of it. This code seems quite solid – full of event handling and stuff –, isn’t it possible the TypeScript compiler will try to polyfill snippets that affect performance? Of course native TypeScript would be best for implementation, but I think generating type definitions from JSDoc (or manually) seems a simpler step. |
Adding types in the future does make sense. I currently like the JSDoc idea as a first step, thanks for the input. Regarding hammer.js: I have been using hammerjs myself for years until I ran into problems in both performance and recognition (going into detail would result in a very long text and be off topic here). Hammerjs is unmaintained, and I did not see the possibility to solve my issues by creating a fork because of the way hammerjs recognizes input. To put it simply, contactjs relies much more on vector calculations than hammerjs does. |
@biodiv I've started work on a port of ContactJS that's written in TypeScript, which, of course, includes type information. I've noticed a few potential bugs in the process; perhaps we can merge the projects? The first pass simply adds types to the existing code and fixes a few internal issues, but the generated types should be compatible with the existing library. |
@SE2Dev that sounds great. I suggest the following:
What do you think? |
I've already finished the initial version of the conversion, which is available here. There are some additional changes that will probably need to be made in the future, but for an initial conversion it should hopefully be sufficient. |
Atm a lot of the frontend dev is done using TypeScript.
Do you plan to add types to the lib later on?
The text was updated successfully, but these errors were encountered: