Skip to content

Commit 3919333

Browse files
authored
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.
1 parent bc8db3a commit 3919333

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ export function createFFmpeg(options?: CreateFFmpegOptions): FFmpeg;
102102
* Uint8Array variable for ffmpeg.wasm to consume.
103103
*
104104
*/
105-
export function fetchFile(data: string | Buffer | Blob | File): Uint8Array;
105+
export function fetchFile(data: string | Buffer | Blob | File): Promise<Uint8Array>;

0 commit comments

Comments
 (0)