-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Two typescript fixes for react-widget Reverse-engineer and fix type type problems: DialogApi: fileColl: FileInfo[] => CollectionOfPromises<FileInfo>; The fileColl property is not an array of file infos. It is a collection of promises that resolve to file infos when they are uploaded. This is initialized here: https://github.com/uploadcare/uploadcare-widget/blob/1b33ac45986bffeb311bdb1293170b3925932aa1/src/widget/dialog.js#L265 ```javascript // files collection this.files = new CollectionOfPromises(files) ``` Second, FileUpload is cancelable. This is added in uploadcare-widget: https://github.com/uploadcare/uploadcare-widget/blob/1b33ac45986bffeb311bdb1293170b3925932aa1/src/files/base.js#L230 ```javascript api.cancel = this.__cancel.bind(this) ``` * Add definition for FileGroup and update the promise for FilesUpload * Typescript patch for FileInfo FileInfo: the uuid/mimeType can both be null for new files when the validator is invoked * Add changelog entries * Fix the FilesUpload interface. The promise is a FileGruopUpload, not a FileGruop. The difference being a promise that resolves to a FileGroup vs a FileGroup
- Loading branch information
1 parent
3953716
commit 438b9e4
Showing
2 changed files
with
62 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters