Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Conflicting types (string, bool) for RNFetchBlobWriteStream.append property #461

Closed
@lll000111

Description

@lll000111

I know you don't really use the Flow types (very unfortunate I must say), but this is a 10 second fix:

In file https://github.com/wkh237/react-native-fetch-blob/blob/master/class/RNFetchBlobWriteStream.js

there is append : bool;, but in the constructor there is append:string

I guess you could also change encoding to be the same as for the read stream class instead of just string:

encoding : 'utf8' | 'ascii' | 'base64';

PS: This class is not mentioned on Wiki page https://github.com/wkh237/react-native-fetch-blob/wiki/Classes, only RNFetchBlobReadStream EDIT: I added that class, didn't know I could actually do that as a random user :-)

QUESTION (about my edit on the Wiki page): It seems to me "detail" (link to source) is a string? I left out the type when I added that method because I'm not quite sure.


By the way, after completely ignoring encoding "ascii" for the longest time because I associate that with "old, only 7 bit per byte are used", I now found that the encoding called "ascii" actually means "Uint8Array", i.e. binary. I find the naming very unfortunate, to me it signals the complete opposite of "binary" (I don't think I'm alone in this?). Adding to the confusion is the existence of base64, so that I thought all binary data has to be base64 string encoded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions