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.
This commit is contained in:
Jannchie 2021-01-13 16:33:30 +09:00 committed by GitHub
parent c03cd585da
commit 74a0a5a234
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

2
src/index.d.ts vendored
View File

@ -102,4 +102,4 @@ export function createFFmpeg(options?: CreateFFmpegOptions): FFmpeg;
* Uint8Array variable for ffmpeg.wasm to consume. * 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<Uint8Array>;