Closed mjwwit closed 6 years ago
Well, that was fast! 🥇 @jdanyow Can you do a review of the TS project setup? @mjwwit Just to confirm, besides improving the typings themselves, this doesn't include any breaking changes to the js API or behavior does it?
I like fast. And no, no API changes have been made.
@jdanyow @EisenbergEffect I'm willing to refactor more of Aurelia's codebase to TypeScript, but I want to know if this is the way to go.
We'd love to have your assistance in this. @jdanyow Can you review and provide feedback? @mjwwit is interested in helping us convert more to TypeScript and wants to have your sign-off that this is the right way.
As the PR has been merged I take it this is the way to go. Are there any projects you'd like me to migrate first, or should I just start with whatever I like? Will we be working in typescript-port branches in other projects as well? If so, can you create these branches so I can submit PRs?
I think it would be best to start with some small ones for which there might be high return on investment. What about doing the event-aggregator next? I think the APIs could be made nicer for TypeScript users providing good value there. Let's go one at a time and see how it goes. Thoughts?
Works for me. I'll do event-aggregator next then. Can you create a branch there?
@mjwwit It would be nice if the PRs could be made more incremental with multiple commits, so that each commit can be reviewed individually. There could be a commit where the files are renamed to the ts extension, one were the missing types are added and so on.
@EisenbergEffect I would like to help convert the route-recognizer library to typescript too. There is a bit of code there which is missing types and I think I already have a local branch which adds the missing types. What do you think?
@gheoan Splitting it up doesn't make sense to me, as the parts don't work/compile/build by themselves. How would it help the reviewing process? In the end its the same changes... I'd love to explain the process of migrating if that's what you're looking for.
Either way, this is getting way off topic for this PR, maybe it's a good idea to continue migration talk on Discourse.
@mjwwit With a single commit the github diff interface only shows that the whole src/aurelia-testing.js
file was removed and that src/aurelia-testing.ts
was added. This makes it hard to spot changes to the code itself such that the import declarations were changed in aurelia-testing.ts
. Commits should be as small as possible, so that the commit can be reverted or tracked down in the history. However, do not feel obligated to do this as it is only a recommendation.
Thank you for working on typescript conversion and sorry for the offtopic.
I think this worked out well enough for us. We were able to review and glad to have the contributions from @mjwwit.
waitFor
,waitForElement
, andwaitForElements
(#72)ComponentTester.detached
bind
,attached
, andunbind
(return value is aPromise
)ComponentTester
generic, so a contained view-model type can be passed indispose
bindingContext
type from any to{}
, as it has to be anObject
Closes #72, possible breaking changes for TypeScript users