Skip to content

Add TypeScript definitions#360

Merged
RobbieTheWagner merged 4 commits intoshipshapecode:masterfrom
superheri:typings
Jun 13, 2019
Merged

Add TypeScript definitions#360
RobbieTheWagner merged 4 commits intoshipshapecode:masterfrom
superheri:typings

Conversation

@superheri
Copy link
Copy Markdown
Contributor

Trying to implement #359.

For now, only Step types are present as of a base. A couple of things would need to be clarified.

Many TODOs are in the code @rwwagner90 if you have some time, could you give me your thoughts on this start? There are some things I'm not sure about, if you could check the TODOs that would be nice.

If you like how it goes, I would continue with the other files.

@RobbieTheWagner RobbieTheWagner self-requested a review April 24, 2019 01:40
@RobbieTheWagner
Copy link
Copy Markdown
Member

@superheri This looks like a good start to me! I will take a more in depth look later this week.

@RobbieTheWagner
Copy link
Copy Markdown
Member

@chuckcarpenter since you are likely more knowledgable on TS, perhaps you could take a look?

@stale
Copy link
Copy Markdown

stale bot commented May 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@RobbieTheWagner
Copy link
Copy Markdown
Member

@chuckcarpenter @superheri any updates on this?

@superheri
Copy link
Copy Markdown
Contributor Author

I was waiting for an answer before continuing. But if you want I can continue slowly during my free times.

@RobbieTheWagner
Copy link
Copy Markdown
Member

@superheri an answer about what? @chuckcarpenter can you please weigh in?

@superheri
Copy link
Copy Markdown
Contributor Author

@rwwagner90 About the questions that @chuckcarpenter asked me directly about the code and the reason to do it that way.

@chuckcarpenter
Copy link
Copy Markdown
Member

@superheri I resolved my initial question based on your answer. If you'd like to keep working on this, we can look at rewriting in TS over time. Sorry for the confusion!

@superheri
Copy link
Copy Markdown
Contributor Author

Ok then, I can't promise you that I'll be very fast, but I'll continue to work on this.

@superheri
Copy link
Copy Markdown
Contributor Author

@rwwagner90 Seems like it for now. From what I see not everything needs typings since not everything is exposed. Maybe there are some things that should be changed, feel free to tell me if there are anything you want me to change.

@RobbieTheWagner
Copy link
Copy Markdown
Member

@chuckcarpenter do you mind reviewing again please?

@RobbieTheWagner
Copy link
Copy Markdown
Member

@superheri this looks good to me! Have you tried this out with your project to ensure the typings behave as you expect? If so, I think we should be good to merge 😃

@superheri
Copy link
Copy Markdown
Contributor Author

@rwwagner90 I stopped working at my job where I this package is used so I no more have a real usage of it to test it out correctly. So I haven't tried it in a real case. I tried calling the different objects exposed individually in a really small project, but I don't think it is enough. Maybe if one of you has a more complicated demo, I could try that out with it and maybe you could try it out too so we will be sure it works fine before releasing it.

@superheri superheri changed the title WIP - Add TypeScript definitions Add TypeScript definitions Jun 13, 2019
…making options optional and editing the typings of the Shepherd.d.ts to define it as a class type not the instance of those classes
@superheri
Copy link
Copy Markdown
Contributor Author

@rwwagner90 Just tried it out with the welcome.js file whan converting it into TypeScript (Testing with TypeScript 3.5.1). (Just realised I had a demo to test it...) I adapted some things and it seems to work with that demo now. However, the demo does not represent every cases and maybe there are some that are not covered.

But if you want we could try to deploy it as is for a first version and see if anyone has issues with this.

@RobbieTheWagner
Copy link
Copy Markdown
Member

I think deploying as a first version sounds good 👍

@RobbieTheWagner RobbieTheWagner merged commit fe2ba3f into shipshapecode:master Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants