raucao
July 29, 2020, 1:23pm
6
@Pwebi Just in case you hadn’t seen it: we have ported the whole library to TypeScript in the meantime, and there is an open PR waiting for reviews:
remotestorage:master
← remotestorage:feature/typescript_conversion
opened 04:43PM - 04 Apr 20 UTC
I think this will make the source code easier to understand and reason about, es… pecially in the very large classes/modules that pass data between many functions. It also removes the potential for type-related bugs, of course. Last but not least, with the popularity of TypeScript, people have already asked for TS definitions for this library, for importing it in their TS codebases.
As of now, I have only converted the Sync class, because that was the one where I was trying to debug and change something at the time. I haven't even started adding types really, but already fixed a bunch of other issues that the TS compiler complained about.
@johannesjo has [offered to help](https://community.remotestorage.io/t/state-of-the-project/614/5?u=raucao) with this, and proposed a mode of collaboration:
> We probably should take good care not to work on it at the same time, as there are so many potential conflicts. Maybe we can do it like this: Once we start working we write a comment on the Draft PR and once we’re done (no unpushed local changes) we write another one?
I like the idea of writing comments with human-readable updates when handing back the code. But I think for managing who's currently working on it, we can just use the assignee feature. Whoever starts on something just self-assigns the PR, and unassigns when they stop pushing changes.
@johannesjo, I just invited you as a collaborator to the RS org, so you can push directly to this branch and also self-assign PRs and issues in any of the org repos.
## To Do
* [x] Convert all source files to TypeScript files (with no compilation/ESLint errors, but warnings allowed)
* [x] Lint TypeScript (instead of JS)
* [x] Update release/versioning process/scripts to include TS compilation
* [ ] Implement process for publishing type definitions
* [ ] Fix/update node.js usage/integration (`index.js`)
* [ ] Ensure the documentation setup still works with the new source files (Sphinx + JSDoc)
The only thing missing for the type definitions release is the process for the actual committing and releasing of the definition files. Maybe you could help with this?