23 / resumable.js

A JavaScript library for providing multiple simultaneous, stable, fault-tolerant and resumable/restartable uploads via the HTML5 File API.
MIT License
4.65k stars 612 forks source link

Refine TypeScript module definition to make it usable #515

Closed frantic1048 closed 5 years ago

frantic1048 commented 5 years ago

With existing type definition, ts could not recognize resumable.js as a module nor find the default export info.

However, resumable.js is actually a UMD module. And it has default export.

This PR fixes the type definition to make resumable.js could be correctly recognized as a module in ts. And then ts user could use resumable.js as a usual module like:

import Resumable from 'resumable.js'

const resumable = new Resumable()
upMKuhn commented 5 years ago

Can we get this thing merged :)