tus-js-client icon indicating copy to clipboard operation
tus-js-client copied to clipboard

Generate TypeScript definitions from source

Open Acconut opened this issue 2 years ago • 0 comments

Right now, the definitions life in a separate file and have to be updated manually by hand. This sometimes causes the actual interface of tus-js-client and its TS definitions to be out of sync, causing issues for our users.

To improve the situation, we should consider adding type definitions to the source code using JSDoc and then generating a .d.ts file based on that automatically. The benefit would be that our source code could also be type checked at the same time.

Acconut avatar Oct 29 '21 13:10 Acconut