erisu commented on PR #536:
URL: 
https://github.com/apache/cordova-plugin-file/pull/536#issuecomment-1418922705

   I dont use TypeScript much to be able to confirm the changes but see if 
someone can take a look and review.
   
   From my own understanding, these changes do not appear to be correct, but 
can you explain to me why they would be considered correct?
   
   For example.
   
   Before PR:
   ```ts
       getParent(successCallback: (entry: Entry) => void,
           errorCallback?: (error: FileError) => void): void;
   ```
   
   After PR:
   ```ts
       getParent(successCallback?: (entry: Entry) => void,
           errorCallback?: (error: DOMException) => void): void;
   ```
   
   This is telling users that the error's callback error property is 
`DOMException` but when looking at the actual code, this is not true.
   
   The [`getParent` method in the 
`Entry.js`](https://github.com/apache/cordova-plugin-file/blob/master/www/Entry.js#L255)
 file, is clearly passing the 
[`FileError`](https://github.com/apache/cordova-plugin-file/blob/master/www/FileError.js)
   
   `FileError.js` appears to have added extra APIs for the File API 
specification.
   
   Same with the `getFile` and `getDirectory` method. It changes the success 
callback to `Entry` but in code respecticly it returns `FileEntry` and 
`DirectoryEntry`.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to