-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typescript: Replace file types with interfaces #289
Comments
Is here any consistent solution or example for Node.js environment? |
tus-js-client does not accept tus-js-client/lib/node/fileReader.js Lines 10 to 12 in 97015bf
Does that apply to your |
@Acconut, thank you for your answer! I was able to use NodeJS The solution I ended up with is:
|
I see, thanks for the update. Our current type definitions are focused on the use in browser, which is not ideal, I agree. We should have type definitions that work in browsers and in Node.js. |
Currently, the definitions reference browser-specific types, which do not exist in other environments, e.g. in Node.js:
tus-js-client/lib/index.d.ts
Line 8 in 239343a
It would be better to replace them with interfaces, so we are independent of the environment (pseudo-code):
This could prevent issues like #252
The text was updated successfully, but these errors were encountered: