Donaldcwl / browser-image-compression

Image compression in web browser
MIT License
1.3k stars 160 forks source link

Update interfaces & docs #82

Closed jamiehaywood closed 3 years ago

jamiehaywood commented 4 years ago

Based on the Mozilla documentation - the File interface inherits from the Blob interface and therefore the union type is unnecessary.

The primary reason for raising this PR is I was receiving type errors in my code:

Type 'File | Blob' is not assignable to type 'File'.
  Type 'Blob' is missing the following properties from type 'File': lastModified, name

This change addresses this issue. closes #83

jamiehaywood commented 3 years ago

hi @Donaldcwl have you had a chance to review this code?