question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A Transform for this project to Typescript

See original GitHub issue

Ref to #64 #58 and #149

Hi, @Acconut , i explore all the internet and i fined this project Tus , i see this project are years of disrepair , but i need use nodejs as server and js/ts as client. so i create a copy of this project and try to translate all of it into Typescript.

you can have a look on this: https://github.com/Lyoko-Jeremie/tus-node-server

the transform are doing in progress. the main code base are done but the Test case dont. (because i unfamiliar about how to Test it, i need some times to learn many thing about it. Now i manual test it with tus-js-client use FileStorage on this project https://github.com/Lyoko-Jeremie/TestTus .)

i add the EVENT_CHUNK_UPLOADED event and MongoDB GridFS Backend to it because i need use the tus on a real project and i need a way to monitor all the progress and my project backend is Mongodb GFS.

the tslint not setup temporarily but i will add it soon. the PR about #64 are done by my PipListener , now it work for FileStorage but i will add it to other storage if i can .(the MongoGridFSStore will be add first if i test it work well.)

i writen a Reliable File Block Transport Protocol base Websocket for my real project at last two month, it with file hash verify like the Bittorrent to ensure the file complete AND some access control struct when connect setup to avoid server local disk fullfill attack And work with redis to keep distributied file lock work well. when i turn to my Protocol after a holiday, i suddenly discovered that my protocal is so complex. so i want to base on tus protocal and add some feature to this nodejs server implement ( example a plugin framework or something similar ) to make it can work on my real project.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Lyoko-Jeremiecommented, Dec 22, 2019

now you can try this: https://github.com/Lyoko-Jeremie/tus-node-server

i think this is stable, and it can be published to npm. only to follow or run the generate.bat file to compile the TS into js, and then publish it to npm.

i will publish it a few day later.

1reaction
Lyoko-Jeremiecommented, Dec 22, 2019

Besides knowing Node.js, one now must also understand how the TypeScript system works.

Sorry i don’t think that. Use ts can make more help when dev and the user don’t need to care about it after ts compiled into a js lib.

After a typescript lib compile, it generate the .js file and .d.ts file. previous js user don’t need to care about the .d.ts file , they can direct use the .js file like before . And in the same time, the user’s IDE will auto read the .d.ts file to make intellisense and some tips in the back, example vscode or webstrom.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Documentation - Migrating from JavaScript - TypeScript
TypeScript uses a file called tsconfig.json for managing your project's options, such as which files you want to include, and what sorts of...
Read more >
Converting a Javascript project to Typescript - Medium
Recently, I took part in a migration project from Javascript to TypeScript for an established Software product with thousands of live users. The ......
Read more >
Converting JavaScript to TypeScript - TutorialsTeacher
Converting Existing JavaScript to TypeScript · Add tsconfig.json file to project · Integrate with a build tool · Change all .js files to...
Read more >
8 Tips for Converting That Big Project to TypeScript
The hybrid method allows your team to migrate to TypeScript without stopping the development process. Use the allowJs compiler option to add new ......
Read more >
A simple guide for migrating from JavaScript to TypeScript
This article shows you how to easily migrate a React component from JavaScript to TypeScript to improve your project.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found