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:
parent
c03cd585da
commit
74a0a5a234
2
src/index.d.ts
vendored
2
src/index.d.ts
vendored
@ -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>;
|
||||||
|
Loading…
Reference in New Issue
Block a user