[strict[ ScreenCaptureButton

Summary: _typescript_

Reviewed By: jknoxville

Differential Revision: D17282357

fbshipit-source-id: 6ddd912978faa30195f59971f19d29d3ea79342b
This commit is contained in:
Daniel Büchele
2019-09-11 03:01:18 -07:00
committed by Facebook Github Bot
parent 7e833b1d70
commit ac120aa59c
5 changed files with 22 additions and 11 deletions

View File

@@ -11,7 +11,10 @@ import fs from 'fs';
* Writes a buffer to a specified file path.
* Returns a Promise which resolves to the file path.
*/
export const writeBufferToFile = (filePath: string, buffer: Buffer) => {
export const writeBufferToFile = (
filePath: string,
buffer: Buffer,
): Promise<string> => {
return new Promise((resolve, reject) => {
fs.writeFile(filePath, buffer, err => {
if (err) {