-
Notifications
You must be signed in to change notification settings - Fork 569
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
Migration to Typescript #123
Conversation
A couple of comments here (as it's on my stack but really don't know when I'll get time - so thanks!!!) -
Most important thing is getting some decent code quality in via tslint - can reorganise the files better at a later point ;-) |
I already included
Why your code is written in es3? If you prefer standard and/or es6, please change the settings. I prefer es5 mostly, but I set es3 because your code style is old.
Did you really review the code?
You should point out where. If you don't want to accept this PR, I don't mind. |
I add some comments for if you are not familiar with The Your code moved to I copied your code, and modified for When you need to change the code, you need to modify the code of The code passes Should I include travis CI or circleCI setting file? Please review more seriously. |
This is a really old library, still being used in really ancient contexts. We'd like to keep that backwards compatibility working, which as some point will mean splitting it into a modern and a legacy version. |
Yes, I understand. That's why I set |
I will add travis configuration file. |
One more thing. |
Here you are. |
Regarding of #47, using const getMapOrObject = (): any => {
return (typeof Map === "undefined") ? new BaseMap() : new Map();
}; Of course, test passed. |
I've not got time to go over this properly (for several days at least) - I've been almost exclusively TS for years now, so will definitely do so when I can. One important thing - if you're doing a plain conversion to TS, then make it an absolutely plain conversion - no changes such as adding Map - those deserve a separate PR of their own because it otherwise makes it a change rather than a re-implementation :-) |
Github updates automatically when I update my repo. I wonder why I have to wait for you for several days even there are some contributors. I don't mind if you don't merge this PR. I archived my purpose for my project at least. |
You can create a branch on your own repo and create a PR from that - basic git usage. I'm just very busy, and only one of several people - but potentially the one with the most Typescript experience. Even if I could look through this tomorrow (and I feel it's more than likely I'll not get enough time till December actually) - I'd still want at least one other person to look over it too - this is a library with a lot of users, and it can't afford to break compatibility on any otherwise obsolete browsers or NodeJS installs until we get enough time to do a full update (see other open issues for some of the ideas). |
I understand the waiting time for testing a lot, not waiting one person. Anyway, I leave this PR. Merging or not merging is depends on the contributors. I don't mind. |
We really appreciate the effort! I'm sure it's OK (not enough TS experience to judge) and in the worst case you'll have created a good starting point! :) (reminds me: do we have a list of contributors or something like that?) |
TypeScript guarantees the compatibility of the code logic, even es3. As far as I take a look inside the generated file, there is no possible code for any problem. And if this library support Even if you want to test on multiple platforms with multiple browsers, you need to create a test project using cordova-paramedic with SauceLab. The SauceLab provides multiple environments such as I created .travis.yml file with |
@JobLeonard ...I don't think we do - definitely need a CONTRIBUTORS.md file! @wf9a5m75 The testing does need looking at - there are occasional differences in browsers that mean even though NodeJS testing is good enough for almost everything, we do need to be able to test in browsers (via Travis / BrowserStack / locally etc) - I'm also a definite fan of having the test file next to the main fail - but that's probably another PR ;-) Doh for |
Ok, after a long time not being able to / having the time to do anything, back at looking into this. @wf9a5m75 if you're still interested in continuing with this could you have a look at converting over to using https://github.com/formium/tsdx for a standard way of doing things - if not then are you happy for me to take over and change for that - shouldn't be any code changes, just lint and build changes - it also handles building for other platforms, and can easily add babel support at a later date :-) |
Closed in favour of #174 |
Thank you for creating this library.
I migrated current master branch code to TypeScript.
Writing TypeScript code gives you to some benefits:
...
I like pure JS for long years, but I like also TypeScript recently.