From 74a0a5a23401bee8b99d33a4c527a8ebc3819948 Mon Sep 17 00:00:00 2001 From: Jannchie Date: Wed, 13 Jan 2021 16:33:30 +0900 Subject: [PATCH] fix: index.d.ts `fetchFile()` actually is a asyn function. It is automatically encapsulated as a Promise. Although the current code does not report errors, it misleads TypeScript users into missing the await keyword, which prevents them from reading the file correctly. --- src/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.d.ts b/src/index.d.ts index acaef31..29b2a7a 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -102,4 +102,4 @@ export function createFFmpeg(options?: CreateFFmpegOptions): FFmpeg; * Uint8Array variable for ffmpeg.wasm to consume. * */ -export function fetchFile(data: string | Buffer | Blob | File): Uint8Array; +export function fetchFile(data: string | Buffer | Blob | File): Promise;