Closed diecodev closed 1 year ago
Hi, thank you very much for this typescript support😄. I'm trying to understand what you have done these days but it seems that I don't have adequate knowledge about typescript.
So I think what I'm going to do is just make sure this package can run in RN/Expo projects. Then I'll accept this PR.
Just one thing. Do you think it is a good idea to merge this PR to main and update the original package, or it's better to publish a NEW package something like react-native-neat-date-picker-ts
?
Hi, roto. Sorry for the late response.
I agree with whatever you decide. But to be honest I think is better (if you are agree, of course) if you made me a moderator or collab to help you with some issues and anything else. I notice about your actual situation (militar situation) and I think that I can help you with issues and making you some PR's just for make the component such better.
That would be great! It's very happy to know that you are willing to collaborate this component. I will send you a collaborater invitation. Thank you.
It's very nice to know you are agree with my request. In 2 weeks I am going to make one other PR with the custom hook I mentined and I going to work in the readme file to update docs (in the typescript branch).
Btw, what do you decide? A create new package or just update this one?
I decide to update this one. That way both JS and TS users can use it, and only one package needs to be maintained.
Oh, that's great. I've been bussy for a little bit, but now I got time to work in some updates. I'm going to wait for the merge to work on it. Blessings.
I've done the test of this PR. time to merge it. I should have done this earlier😅 I think I will publish a new version for now and you can working on further works you've mentioned. Thanks a lot!
What I do:
I went to the trouble of add typescript support:
I created the types that were needed and added several lines of documentation.
I changed the format function that was implemented by another one that is better (because it does not modify the Date.prototype which is a bug in typescript. You can see all the new function in the dateFormat file).
I added the EsLint configuration to have a generalized code writing pattern (obtained by Standard style guide because in the files most of them did not have semicolons.
Ps. I have an idea to make it so that anyone who wants to make contributions to the project can do so without creating a react-native/expo project and then installing the npm package from this repo, but I have to do the necessary research first to see if it will work.
To do:
Ps-II. I did the testing on my cell phone using expo and there were no bugs, however, I invite anyone to test this branch (if you are interested in Typescript support) in order to find future bugs.
--STEPS TO PUBLISH THE NEW PACKAGE--
npm install --save
.npx tsc
(in case you have typescript installed as a global deps, use justtsc
).Sorry for add contributors tag in package json (in case you are disagree). 💙