Skip to content

Conversation

@t49tran
Copy link

@t49tran t49tran commented May 19, 2021

Including in this PR:

  • Improve typescript and flow type definition for encodingOrOptions. Changing the type definition from any to an union type of encoding string (one of ascii, base64 or utf8) and object.

  • Refactor read / write functions, extract encoding / decoding logic to generic functions: getEncodingOrOptions, decodeContents, encodeContents to keep these functions DRY.

  • Upgrade document for readFile, read, readFileAssets, readFileRes, writeFile, appendFile and write to reflect the type definition change and to make them up-to-date with the implementation in FS.common.js.

iBotPeaches added a commit to sourcetoad/react-native-fs2 that referenced this pull request Dec 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant