[ 
https://issues.apache.org/jira/browse/CB-13960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16634574#comment-16634574
 ] 

ASF GitHub Bot commented on CB-13960:
-------------------------------------

janpio closed pull request #231: CB-13960: fix FileWriter.write argument type 
definition for typescript
URL: https://github.com/apache/cordova-plugin-file/pull/231
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/types/index.d.ts b/types/index.d.ts
index c748e3da..40f1a822 100644
--- a/types/index.d.ts
+++ b/types/index.d.ts
@@ -294,9 +294,9 @@ interface FileWriter extends FileSaver {
     length: number;
     /**
      * Write the supplied data to the file at position.
-     * @param {Blob} data The blob to write.
+     * @param {Blob|string} data The blob to write.
      */
-    write(data: Blob): void;
+    write(data: Blob|string): void;
     /**
      * The file position at which the next write will occur.
      * @param offset If nonnegative, an absolute byte offset into the file.


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Typescript: FileWriter write argument definition shall include type string
> --------------------------------------------------------------------------
>
>                 Key: CB-13960
>                 URL: https://issues.apache.org/jira/browse/CB-13960
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-plugin-file
>            Reporter: Vladimir
>            Priority: Major
>
> www\FileWriter.js has the following annotation on write method:
> {code:java}
> @param data text or blob to be writte{code}
> But types\index.d.ts has the following type definition:
> {code:java}
>     /**
>      * Write the supplied data to the file at position.
>      * @param {Blob} data The blob to write.
>      */
>     write(data: Blob): void;{code}
> Shall be as follows:
> {code:java}
>     /**
>      * Write the supplied data to the file at position.
>      * @param {Blob|string} data The blob to write.
>      */
>     write(data: Blob|string): void;{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org
For additional commands, e-mail: issues-h...@cordova.apache.org

Reply via email to